Name

continue

Synopsis

The continue statement can only be used within the body of a loop. It jumps over the remainder of the loop body. Thus in a while or do ... while loop, it jumps to the next test of the controlling expression, and in a for loop it jumps to the evaluation of the per-iteration adjustment expression.

Syntax:

continue;

Example:

for (i = -10; i < 10; ++i
{  ...
  if (i == 0) continue;     // Skip the value 0
   ...
}

Get C Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.