break Statement in C
Notes:
break Statement in C Programming Language
Jumping / Control transfer Statements in C:
- To make the control jump / transfer directly from one place to another place, we use jumping or control transfer statements.
- break
- continue
- goto
- function call
- return
break statement: It terminates the loop
- Computer skips statement(s) under the break statement, and transfers the control outside the loop
Syntax:
break;
Ex:
int i =0;
for(i=1; i<6; i++ )
{
if(i==3)
{
break;
}
printf(“%d\n”,i);
}
Note:
break statement is used to write efficient codes