Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET

Previous Year Question (PYQs)



In what sequence the initialization, testing and execution of body is done while using do-while loop?

I. Commenting
II. Execution of the body
III. Initialisation
IV. Testing the condition

Choose the correct answer from the following:






Solution

In a do-while loop, initialization is done first.

Then the loop body executes at least once.

After executing the body, the condition is tested.

So, correct order is:

Initialisation → Execution of the body → Testing the condition

That is:

III, II, IV



Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...