Important MCQ

If the condition is true at the start, do- while behaves

Q.If the condition is true at the start, do- while behaves

A) like a while loop
B) like a switch
C) like a comment
D) like an if statement
Correct Answer:
Option A
Detailed Explanation:
A) like a while loop is correct. A do-while loop executes its body before checking the condition, so it runs at least once. Its closing while(condition) is followed by a semicolon.