1.

Which of the following is an exit-controlled loop?(a) for(b) while(c) do-while(d) all of the mentionedThe question was asked during an interview for a job.Asked question is from C++ Concepts in portion Basics Concepts of C++ of C++

Answer» RIGHT option is (C) do-while

The explanation: do-while is called exit controlled loop because in do-while termination condition is checked when we have executed the BODY of the loop i.e. we are EXITING the body and then checking the condition, THEREFORE, it is called exit controlled loop.


Discussion

No Comment Found

Related InterviewSolutions