Which of the following is an exit-controlled loop?

Thành Đạt

New member
Which of the following is an exit-controlled loop?
A. for
B. while
C. do-while
D. all of the mentioned
 
Answer: c
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.
 

Tìm kiếm

Back
Top