1.

We cannot use a ____ statement in the standalone if-else structure.(a) break(b) if-else(c) return(d) switch-caseThe question was asked during an interview.Asked question is from Branching topic in portion MATLAB Programming of MATLAB

Answer»

Correct answer is (a) break

The explanation is: If the if-else structure is not within any loop, we cannot USE the break STATEMENT. The break statement is only ALLOWED for loops. If the if-else structure is part of a loop, we can use the break statement to END the loop before it reaches its limit.



Discussion

No Comment Found

Related InterviewSolutions