What happens to the control flow of a program when the break statement is encountered inside a while loop? 

  • The program exits 
  • The while loop terminates and control moves to the next statement after the loop 
  • The loop skips to the next iteration 
  • The loop starts from the beginning
When a break statement is encountered inside a while loop, the loop terminates immediately and the control moves to the next statement following the loop, regardless of the loop's condition.
Add your answer
Loading...

Leave a comment

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