Question Bank (2 marks) · Q33
Q.Write the syntax of do while statement.
Karnataka PUCTextbookShort· 2mImportance★★★★★est
95% · 146/154 Questions
You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
Start your 14-day free trial to unlock the full solution →[!TLDR]
Syntax: do { statements; } while (condition); — body runs before the test.
The do-while statement is an exit-controlled loop: the body is executed first, and only then is the condition checked. If the condition is true, the loop repeats; if false, it exits. Because the test comes at the end, the body always executes at least once. Note the mandatory semicolon after the while cond …
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.