What is the primary purpose of the break statement in C++ loops? 

  • To skip the next iteration 
  • To pause the loop for a moment 
  • To terminate the loop 
  • To reduce execution time
The break statement in C++ is used to terminate the loop, irrespective of whether the loop's condition has been met or not. This can be useful when a certain condition, separate from the loop's terminating condition, is met and the loop needs to end prematurely.
Add your answer
Loading...

Leave a comment

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