Algorithms & Flow Control MCQs

Topic-wise practice questions for Problem Solving & Analytical Skills. Test your knowledge, check solutions on demand, and pace your preparation.

Zero-leak answer engine • Rate-limited explanations
Practice in Timed Mode
Q21easy
Which of the following best describes "Control Flow"?
Q22medium
You need to create a menu that displays options to the user, waits for their input, and repeats UNTIL the user chooses "Exit". Which loop is the most natural fit?
Q23hard
(Code Output) Trace this recursive algorithm:

Function blastoff(n):
    if (n == 0):
        print("Ignition")
    else:
        print(n)
        blastoff(n - 1)
blastoff(2)
Q24medium
Why will the following code result in an infinite loop?

count = 10
while (count > 0):
    print(count)
    count = count + 1
Q25easy
How many times will the following loop execute?

for (i = 0; i < 10; i = i + 2)