For Loop Initial Condition
Which of the following for loops will never execute its body because the loop continuation condition is initially false?
A
for (int i = 10; i < 5; i++) {
System.out.println(i);
}
B
for (int i = 10; i > 5; i--) {
System.out.println(i);
}
C
while(false) {
System.out.println("Never executes");
}
D
for (int i = 10; i < 15; i++) {
System.out.println(i);
}
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | sgarv2513 | 1 | 1 | 0m 00s | 100 |
| #2 | hitrishabhatia | 1 | 2 | 0m 00s | 90 |
| #3 | suhanakochhar006 | 1 | 2 | 0m 52s | 38 |
| #4 | y.seong2027 | 1 | 2 | 0m 52s | 38 |
| #5 | bommasam000 | 1 | 2 | 1m 14s | 16 |
| #6 | midnightasdark | 0 | 1 | 0m 28s | -38 |
| #7 | Pelisx | 1 | 1 | 4m 56s | -196 |
Items per page:
10
1 – 7 of 7
APFIVE