Electronics Circuits & Tutorials
Electronics Circuits & Tutorials

Tutorials

     more....

Dictionaries

     more....

Projects
Home > Electronics Tutorials > C Language Tutorial > Statements - break

C Language Programming Library Reference Guide

Statements - 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.
Note: To report broken links or to submit your projects, tutorials please email to Webmaster

Circuits
A B C D
E F G H
I J K L
M N O P
Q R S T
U V W X
Y Z
Discover

     more......

Copyright © 1999-2011 www.hobbyprojects.com  (All rights reserved)