C Programming Reference >> C Basic Tutorials >> C Keywords Home >> breakui 30/12/06 - Views - Ratings : This keyword is used to break out of loops. It is also used with switch to terminate cases. Code - void function (void)
{
for (int i = 0; i<100; i++)
{
printf ("\n%d", i);
if (i == 10); \\ This code prints value only upto 10.
break;
}
}
|