ICSE Class 10 Computer Applications Question 47 of 69

Iterative Constructs in Java — Question 2

Back to all questions
2
Question

Question 2

Which of the following loop executes at least once?

  1. while
  2. for
  3. do-while
  4. None of these
Answer

do-while

Reason — do-while is an exit controlled loop and the test condition is checked at the end of the loop. Hence, it always executes at least once.