In what sequence are initialisation, testing and execution of the body done in a do-while loop?
I. Commenting
II. Execution of the body
III. Initialisation
IV. Testing the condition
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: D. III, II, IV
Explanation
A do-while runs the body once before testing: initialise → execute body → test.More Programming Languages and Computer Graphics questions
- Assertion A: A raster-scan device is a CRT graphics device and can use a television monitor for display. Reason R: In a raster-scan display…
- The hidden-surface removal problem with a minimal 3D pipeline can be solved with
- The condition num != 65 cannot be replaced by
- Pointers cannot be used to
- Which mechanism in XML allows organisations to specify globally unique names as element tags in documents?
- The following transformation (with general entries in all four rows) is called[x'] [a1 b1 c1 d1] [x] [y'] = [a2 b2 c2 d2] [y] [z'] [a3 b3 c…