GK Question

technology medium fill_blank

In programming, a loop that executes at least once regardless of condition is called a ________ loop.

Answer: do-while

do-while loop checks the condition AFTER executing the loop body, guaranteeing at least one execution. In contrast, while and for loops check condition BEFORE execution, potentially skipping the body entirely if condition is initially false. Syntax varies by language but logic remains consistent.

Topic Database & Programming
Exam Relevance SSC JE, Banking IT, Railway