C Programming Reference


C Programming Reference >> C Basic Tutorials >> C Keywords Home >>

breakui

30/12/06 -  Views - Ratings :   3.48 of 5 / 155 Votes

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;
 }


}

Back To Top


      

 

 

© 2006 cencyclopedia.com