- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference Between break and continue
In this post, we will understand the difference between break and continue statements.
It is used to terminate the enclosing loop like while, do-while, for, or switch statement where it is declared.
It resumes control over the program until the end of the loop.
It also helps with the flow of control outside the loop.
It is used with ‘switch’ and ‘label’ since it is compatible.
Following is the flowchart of break statement −
It helps skip the remaining part of the loop.
It continues to execute the next iteration.
It causes early execution of the next iteration of the enclosing loop.
It can’t be used with ‘switch’ and ‘label’ since it is not compatible.
Following is the flowchart of continue statement −
- Difference between continue and break statements in Java
- What is the difference between break and continue statements in C#?
- break, continue and label in Java loop
- Loops and Control Statements (continue, break and pass) in Python
- How to use break and continue statements in Java?
- 'break' and 'continue' in forEach in Kotlin
- How to control for loop using break and continue statements in C#?
- Usage of page-break-before, page-break-after, and page-break-inside properties in CSS
- PHP continue Statement
- Difference between C# and .Net
- Difference between Process and Thread