What does the break statement do in a loop structure? 

  • Exits the entire program. 
  • Skips to the next iteration. 
  • Exits the loop immediately. 
  • Continues to execute the loop from the start.
The break statement in C++ is used to exit the loop immediately, bypassing the rest of the loop's code and any remaining iterations. This can be especially useful for exiting a loop when a specific condition is met.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *