In a while loop, placing a ________ statement inside the loop can help prevent infinite loops by providing an explicit exit.

  • Break
  • Continue
  • Return
  • Stop
In a while loop, placing a "break" statement inside the loop can help prevent infinite loops by providing an explicit exit condition. When a certain condition is met, the "break" statement terminates the loop, allowing you to exit the loop when necessary and avoid infinite iterations.
Add your answer
Loading...

Leave a comment

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