A break statement is a command which causes the program to immediately stop executing the current iteration of the loop, and move to the next iteration.
A break statement is used to stop a loop. A break statement can also be used to stop a switch statement.
The break statement is used to terminate the execution of a loop. It is commonly used in for loops to terminate the loop if a certain condition is met.
When the break statement is found, the loop is immediately terminated. It has the following syntax: break; inside the loop, the break statement is nearly often used with the if...else statement.
The break statement is used to stop the execution of the current loop and transfer program control to the next statement. The next statement is used to skip the remaining statements in a loop.
Share a personalized message with your friends.