1.

A break statement will leave the outer loop.(a) True(b) FalseThe question was posed to me in an interview.My doubt stems from Loops topic in chapter Interacting with MATLAB of MATLAB

Answer»

Right OPTION is (B) False

Explanation: In case of nested for-loops or while-loops, the break statement will remove CONTROL only form the loop where it was INVOKED as a command. It won’t come out from the OUTER loop.



Discussion

No Comment Found

Related InterviewSolutions