C continue Statement

In C language, the continue statements work just opposite to the break statement. That is, instead of forcing termination, continue forces the next iteration of the loop to take place, skipping any code remains after the continue statement. Let's go through the following program to understand the continue statement.

C continue Statement Example

Here is the example program that uses the continue statement in C programming.

/* C continue Statement Example 
 * This program illustrates
 * the concept of break statement in C

void main()
   int i;
   int num = 2;

   for(i=1; i<50; i++)
      printf("%d * %d = %d\n", num, i, num*i);
      if(i>0 && i<10)
         printf("\npress any key to exit..\n");


This program also prints the table of 2. Here is the sample output of above continue statement program in C language.

c continue statement

C Online Test

« Previous Tutorial Next Tutorial »

Follow/Like Us on Facebook

Subscribe Us on YouTube