C Programming Reference >> C Basic Tutorials >> C Keywords Home >> continueui 30/12/06 - Views - Ratings : Continue is reverse of that of break. It forces the loop to execute again jumping the statements below the continue. In case of for the continue increments the value of variable and forces a new cycle of loop. Code - void function (void)
{
for (int i = 0; i<100; i++)
{
if (i == 10); \\ This code prints value only upto 9 even though loop executes 100 times.
continue ;
printf ("\n%d", i);
}
}
|