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

The do-while statement

C's do-while statement has the form:

do

For example:

int x=3;

main()

..outputs:

x=3

x=2

x=1

NOTE: The postfix x- operator which uses the current value of x while printing and then decrements x.


drago@scri.fsu.edu
Jan. 1997