1.6.8 break

The break statement can only appear in a switch body or a loop body. It causes the execution of the current enclosing switch or loop body to terminate.

Syntax:

break;

Examples:

switch(henry)
 {
 case 1: print("Hi!\n");
         break;
 case 2: break;
 }

If henry is equal to 2, nothing happens.

for(loop=0;loop<50;loop++)
 {
  if(loop==10)
    break;
  printf("%i\n",loop);
 }

Only numbers 0 through 9 are printed.