Which of the following control structures is an exit-controlled loop?

Which of the following control structures is an exit-controlled loop?
A. For loop
B. While loop
C. Const and Goto
D. Do-While loop
 
Answer: D
Explanation: 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.
 

Tìm kiếm

Back
Top