Which executes first in a do.while loop?

1 answer

Answer

1270949

2026-05-03 03:25

+ Follow

In a do-while loop, the code block within the do statement executes first before the condition in the while statement is evaluated. This guarantees that the loop's body runs at least once, regardless of whether the condition is true or false. After the execution of the loop's body, the condition is checked, and if it evaluates to true, the loop will execute again. If the condition is false, the loop terminates.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.