Published on: 12th Nov 2010    |   Last Updated on: 24th Nov 2011

Continue Statement :

Sometimes, it is required to skip a part of a body of loop under specific conditions. So, C supports 'continue' statement to overcome this anomaly.

The working structure of 'continue' is similar as that of that break statement but difference is that it cannot terminate the loop. It causes the loop to be continued with next iteration after skipping statements in between. Continue statement simply skipps statements and continues next iteration.

Syntax :

	continue;

Figure :
stucture of continue statement

Program :


/*  Program to demonstrate continue statement.
Creation Date : 09 Nov 2010 07:44:43 PM
Author : www.technoexam.com [Technowell, Sangli] */

#include <stdio.h> #include <conio.h> void main() { int i; clrscr(); for(i=1; i<=10; i++) { if(i==6) continue; printf("\n\t %d",i); // 6 is omitted } getch(); }

Output :


	1
	2
	3
	4
	5
	7
	8
	9
	10_

Link this post on your Blog/Website :

Follow us on :   Technoexam on facebook Technoexam on twitter Technoexam on linkedin Technoexam on youtube