![]() |
while | Keyword |
Keyword Index |
Repeats execution while the condition is true.
Keyword while
is the most general loop statemens. It uses the following syntax:
while (expression) statementstatement is executed repeatedly as long as the value of expression remains nonzero. The test takes place before each execution of the statement. For example,
while (*p == ' ') p++;Of course, statement may be a compound statement as well.