The CONTROL keyword allows us to ignore the statements occurring after the control statement and transfer the control to the beginning of the loop i.e. it refreshes the loop.It is mainly associated with the if statement.It however differs from the break statement i.e. it somehow opposes the break statement.




/*Demonstration of continue statement*/

main( )
{
int m, n ;
for ( m = 1 ; m <= 2 ; m++ )
{
for ( n = 1 ; n <= 2 ; n++ )
{
if ( m == n )
continue ;
printf ( "\n%d %d\n", m, n ) ;
}
}
}


0 comments to "THE CONTINUE STATEMENT IN C"

Post a Comment

Powered by Blogger.