The continue statement, when executed in a
while statement, skips the remaining statements in the body of that statement and proceeds with the next iteration of the loop. In
while statements, the loop-continuation test evaluates immediately after the
continue statement executes. In the
for statement, the increment expression executes, then the loop-continuation test evaluates.
Figure 5.14 uses the
continue statement (line 11) in a
for statement to skip the output statement (line 13) when the nested
if (lines 10–11) determines that the value of
5. When the
continue statement executes, program control continues with the increment of the control variable in the
for header (line 8) and ...