The continue Statement – Control Flow
4.12 The continue Statement Like the break statement, the continue statement comes in two forms: unlabeled and labeled. Click here to view code image continue; // the unlabeled formcontinuelabel; // the labeled form The continue statement can be used only in a for(;;), for(:), while, or do-while loop to prematurely stop the current iteration of the loop body and proceed with the next iteration, if possible. In the case of the while and do-while loops, the rest of the loop body is skipped—that is, the current iteration is stopped, with execution continuing with the loop condition. In the case of the for(;;) loop, the rest of the loop body is skipped, with execution continuing with the update expression. In Example 4.12, an unlabeled continue statement is used to skip an iteration in a for(;;) loop. Control is transferred to (2) when the value of i is equal to 4 at…