What is do until loop?

A do until loop is used when a programmer wants to repeat statements until a condition becomes true. You can check the condition at the start or end of the loop.

Condition checked at the start of the loop

Do Until condition
// check condition on every iteration. If false, continue executing the statements.
   statements

When the do until loop starts, the loop is terminated if the condition becomes true.

However, if the condition is false, the statements inside the loop are executed, and the process is repeated.

Free Resources

Copyright ©2026 Educative, Inc. All rights reserved