1.

In nested loops, the break statement exits the ____ loop.(a) external(b) last started ongoing(c) not available in MATLAB(d) forI got this question in an interview for job.My doubt stems from More about Loops in portion MATLAB Programming of MATLAB

Answer»

Right OPTION is (b) last started ongoing

Explanation: The break STATEMENT EXITS the LOOP in which it is only CALLED. It doesn’t care about the remaining number of iterations in the loop but it only exits from the inner loop and the control still remains in the outer loop.



Discussion

No Comment Found

Related InterviewSolutions