Multiple choice

Which of the following is the correct choice for making use of 'do-while' loop in a program?

  1. When we do not know the initial value for loop index variable.

  2. When we know value for loop index variable.

  3. When there is no test condition in the loop.

  4. When there is test condition in the beginning of the loop.

  5. When there is no increment statement in the loop.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

This is the correct reason to make use of do-while loop in a program as the condition is verified at the end in do-while loop.