C continue statement


The continue statement in C language is used to bring the program control to the beginning of the loop. The continue statement skips some lines of code inside the loop and continues with the next iteration. It is mainly used for a condition so that we can skip some code for a particular condition.

Syntax:



  1. //loop statements  
  2. continue;  
  3. //some lines of the code which is to be skipped  


Continue statement example 1



  1. #include<stdio.h>  
  2. void main ()  
  3. {  
  4.     int i = 0;   
  5.     while(i!=10)  
  6.     {  
  7.         printf("%d", i);   
  8.         continue;   
  9.         i++;  
  10.     }  
  11. }  

Output

	infinite loop


Jay Kakadiya

Jay Kakadiya Creator

I am a computer field, & i am Web developer.

Suggested Creators

Jay Kakadiya