1.

Which of the following control structures is an exit-controlled loop?(a) For loop(b) While loop(c) Const and Goto(d) Do-While loopI have been asked this question in an interview.This is a very interesting question from Control Structures in portion Arduino Programming of Arduino

Answer»

The CORRECT choice is (d) Do-While loop

To explain: An entry-controlled loop is a looping structure that performs the INITIALIZATION, condition-checking, and increment/decrement operation at the beginning of the loop. So THEREFORE, before a loop even starts to execute, a CHECK is made if the condition is satisfied or not. In an exit controlled only the condition checking is DONE after the execution.



Discussion

No Comment Found

Related InterviewSolutions