What is the behavior of a continue statement inside a while loop? 

  • It skips to the next iteration of the loop immediately. 
  • It breaks out of the loop. 
  • It restarts the loop from the very beginning. 
  • It throws an exception.
The continue statement inside loops, including a while loop, causes the program to skip any code following it in the current iteration and jump to the next iteration. It doesn't break out of the loop but just moves to the evaluation of the loop's condition for the next iteration.
Add your answer
Loading...

Leave a comment

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