Multiple choice

How does the do-while loop different from the while loop?

  1. The do-while loop is faster than the while loop.

  2. The do-while loop is slower than the while loop.

  3. There is no difference.

  4. In a do-while loop, the statement always executes at least once.

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

In a do-while loop, the condition comes after the statement. So, the statement always executes at least once.