For Loop Iteration Count
How many times will the body of the for loop execute in the following code segment?
int count = 0;
for (int i = 0; i < 10;) {
count++;
i += 2;
}
System.out.println(count);
A
6
B
10
C
4
D
5
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | busemagngr | 1 | 1 | 0m 20s | 80 |
| #2 | hitrishabhatia | 1 | 3 | 0m 00s | 80 |
| #3 | meromaroseif | 1 | 1 | 0m 24s | 76 |
Items per page:
10
1 – 3 of 3
