Next: break and continue Up: Looping and Iteration Previous: The while statement

The do-while statement

C's do-while statement has the form:

It is similar to PASCAL's repeat ... until except do while expression is true.

For example:


NOTE: The postfix x- operator which uses the current value of x while printing and then decrements x.
Fri May 20 13:40:49 BST 1994