DamnSchool
The break statement is used to terminate the loop. When the keyword break is used inside any "c" loop, control automatically transferred to the first statement after the loop. A break is usually associated with an if statement.

Break statement

#include<stdio.h>
void main()
{
int i;
for(i=1;i<=10;i++)
{if(i==6)
{break;}
printf("%d",i);
}
}

Run Example >

< Previous Next >

Privacy Policy Terms of Service About
Creative Commons License
This work is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License.