Break Statement in C in C Language
Updated on May 31, 2025 | By Learnzy Academy
The break statement is used to stop a loop or exit from a switch case before it naturally ends. Once break is executed, the control jumps immediately out of the loop or switch and continues with the code that comes after it.
When to Use break?
- You want to exit a loop early based on a condition.
- You want to prevent fall-through in switch cases.
- You’re searching for something in a loop and want to stop when found.
- If a task is done, there’s no need to keep looping. Use break to save time and improve performance.
- If you're using loops inside loops (nested loops), you can use break to exit only the inner loop, when needed.
Syntax of break-
break;
Important Points:
- break only exits the nearest enclosing loop or switch.
- It is commonly used with an if condition to control loop termination.
- Helps improve efficiency by avoiding unnecessary iterations or checks.
Click here to download practice questions on
Break Statement in C