ICSE Class 10 Computer Applications
Question 51 of 69
Iterative Constructs in Java — Question 6
Back to all questions 6
Question Question 6
Which of the following is an empty loop?
- for(i = 0; i < 5; i++);
- while (i < 5) i++;
- do {i++;} while (i < 5);
- All of these
for(i = 0; i < 5; i++);
Reason — The statement for(i = 0; i < 5; i++); has a semicolon at its end. Thus, any statement following it will be treated as outside the for loop.