The break statement is used to break the execution of body of loop. When this statement is encountered, the control is directly transferred to the statement immediately after the loop body. break is also used in switch-case statement to transfer the control of execution from the statements of some case to the statement immediately after the switch-case construct. Program 1 shows the working of break statement followed by the output.
int num, count;
printf(“Enter the number? ”);
for( count=1; count < 10; count++)
if (num == count)
printf(“Number %d/10 display\n”,
Program 1 Program to show the working of break statement.