Accenture Primer
Accenture DumpmediumAccenture PrimerAccenture-Primer-Dump

What kind of controlled structure is used when we don’t know the exact number of times a code needs to be executed?

Answer options

A
switch
B
while
C
for
D
if-else

Correct answer: while

Explanation

A 'while' loop is used when the exact number of iterations is unknown ahead of time — it continues as long as a condition is true. A 'for' loop is used when the iteration count is known; 'switch' and 'if-else' are selection structures, not iteration structures.

Related Accenture Accenture Primer questions

Practice more Accenture Accenture Primer questions

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