While Loop Execution Count
How many times will the body of the while loop execute in the following code segment?
int i = 0;
while (i < 10 && i != 5) {
i++;
}
A
10
B
6
C
4
D
5
Question Leaderboard
Not enough data yet to show leaderboard.
How many times will the body of the while loop execute in the following code segment?
int i = 0;
while (i < 10 && i != 5) {
i++;
}
10
6
4
5
Not enough data yet to show leaderboard.