Pages

Friday, July 31, 2020

CONTINUE STATEMENT IN C



The Continue statement is used with iteration statements (loop) and it work like its name, it force the next iteration of the loop to be execute.

CONTINUE STATEMENT EXAMPLE
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int i;
for(i=1; i<=10; i++)
{
printf(“\n %d”,i);

if(i == 5)
{
printf(“\nEncountered five\n”);
continue;
}
}
getch();                       
}



* * * PROGRAM OUTPUT * * *

No comments:

Post a Comment