{{keywords>wiki library source code example reference}} ====== break ====== syntax break; Description: break ends a loop immediately ===== C Sourcecode Example ===== #include /* including standard library */ //#include /* uncomment this for Windows */ int main ( void ) { int i; i=0; while (1) { i++; if (i==42) { break; } } printf("The answer is %i\n",i); return 0; } ===== output ===== cd@najai:~$ ./break The answer is 42