arrow
arrow
arrow
In which of the following looping constructs of the 'C’ language, the body of the loop is executed at least once?
Question

In which of the following looping constructs of the 'C’ language, the body of the loop is executed at least once?

A.

while construct

B.

for construct

C.

Both 'for' and ’while’ constructs

D.

do—while construct

Correct option is D

In the C language, the do-while construct is the looping construct that executes the body of the loop at least once. 
Explanation
· The do-while loop evaluates the condition at the end of the loop, so the body of the loop is executed at least once. 
· The while loop may never execute, as it repeats a set of instructions based on a condition. 
· The for loop is used to execute a loop a specific number of times.

test-prime-package

Access ‘PSPCL’ Mock Tests with

  • 60000+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
353k+ students have already unlocked exclusive benefits with Test Prime!
test-prime-package

Access ‘PSPCL’ Mock Tests with

  • 60000+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
353k+ students have already unlocked exclusive benefits with Test Prime!
Our Plans
Monthsup-arrow