Accenture Primer
Accenture DumpmediumAccenture PrimerAccenture-Primer-Dump

Consider the scenario: You have written a code to display a menu on the screen and some operation are preformed based on the given user input. Which control structure would you use, so that the menu is guaranteed to show/display at least once on the screen, before performing the operation.

Answer options

A
for loop
B
While loop
C
Do-While loop
D
Case

Correct answer: Do-While loop

Explanation

A Do-While loop is an exit-controlled loop that executes the body at least once before checking the condition, ensuring the menu is displayed before user input is processed.

Related Accenture Accenture Primer questions

Practice more Accenture Accenture Primer questions

PrimerDumps has 1400+ primer questions, 2026 mocks and coding hands-on — all free.