continue

Passes control to the next iteration of the nearest enclosing do, for, or while statement in which it appears, bypassing any remaining statements within that code block.

 

#include <stdio.h>

int main( ) {

	for(int i=0; i<10; i++)
	 {
	  if(i == 5)
	    continue;
	  printf("%in", i);
	 }

	return 0;
}

The above will continue with the for loop, bypassing the next printf() statement when the value of i equals 5

Leave a Reply