1.

What is the name of the control structure used to stop any loop prematurely and only exit out of the loop, not affecting the running of the rest of the program?(a) The continue statement(b) The break statement(c) The exit statement(d) The purge statementThis question was posed to me in an international level competition.This interesting question is from Control Structures in section Arduino Programming of Arduino

Answer»

The correct answer is (b) The BREAK statement

To ELABORATE: From all the above options only the break statement is generally USED for exiting loops. This can be also applied for switch case control structures. The difference between the break statement and the exit statement is that the break statement can only ABORT looping control structures, but the exit statement completely aborts the program execution.



Discussion

No Comment Found

Related InterviewSolutions