In nested loops, if a break statement is executed inside the inner loop, the control will exit the ______ loop.

  • Inner
  • Outer
  • Both inner and outer
  • None of the above
In nested loops, a break statement is used to exit the innermost loop. When it's executed, control exits the inner loop, not the outer one. Therefore, the correct option is 'Inner.'
Add your answer
Loading...

Leave a comment

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