C continue statement

  • continue is a keyword. By using continue, we can skip the statement form loop body.
  • In implementation where we know the maximum number of repetition but some condition is there where we need to skip the statement from the loop body then go for continue.
  • Using continue is always option but it should be placed within the loop body only.


void main()
int a;
while(a<=99) { a+=2; if(a>=40&&a<=80) continue; printf("%d",a); } }

When the continue statement is executed within the loop body then control will pass back to the condition without executing remaining statement.


void main()
int i;
while(i<=79) { i=i+2; if(i>=20&&i<=30) continue; printf("%d",i); } }

Powered by k2schools