do-while loop

noun
UK /ˌduː waɪl ˈluːp/
US /ˌduː waɪl ˈluːp/

A do-while loop is a computer instruction that does a job once and then keeps doing it while a rule stays true.

The program uses a do-while loop to keep asking for a password until the user types the right one.


OTHER MEANINGS

2. A loop structure in which the condition is checked after the body executes, guaranteeing at least one run.

Unlike a while loop, a do-while loop always runs its body at least once.

3. A programming construct used for input validation that must prompt the user before testing the response.

She wrapped the menu prompt in a do-while loop so the menu always appears at least once.

4. A looping statement in languages such as C, C++, and Java written with the keywords do and while.

In C, the do-while loop ends with a semicolon after the while condition.