Menu

Continue Statement in C

Nov 11, 2019 Eduardo Zambrano

  • It is desirable to skip some statements inside the loop. In such cases continue statement is used.
  • It is desirable to skip some statements inside the loop. In such cases continue statement is used.

Syntax

      continue;

Example

     #include<stdio.h>
     main(){
      int i;
      for(i=0;i<10;i++){
      if(i==5){
        continue;
      }
      printf("%d",i);
     }

Output

         0 1 2 3 4 6 7 8 9