Which of the following are entry controlled loops?

ICSE Class 10 Computer Applications PYQ · 2024 Paper · Section A

1(xiii)1 Mark · 2024 · Section A · 2024 Paper

Which of the following are entry controlled loops?

(a) for

(b) while

(c) do..while

(d) switch

Show SolutionHide Solution↓

a and b

Reason — An entry-controlled loop checks the loop condition before executing the loop's body. If the condition is false at the start, the loop's body will not execute even once.
for and while loops check the condition before running the loop's body. If the condition is false, the loop won't run. Therefore, they are entry controlled loops.
The body of the do-while loop executes at least once before checking the condition. Hence, it is an exit controlled loop.

← Previous questionNext question →

Browse the free Computer Applications sample bank