Practical C Programming, 3rd Edition

I l @ ve RuBoard

29.1 do/while

The do/while s tatement has the following syntax:

do { statement ; statement ; } while (expression);

The program loops , tests the expression, and stops if the expression is false (0).

This construct always executes at least once.

do/while is not frequently used in C++ because most programmers prefer to use a while/break combination.

I l @ ve RuBoard

Категории