MCQ
What happens if the base condition isn't defined in recursive programs?
  • Program gets into an infinite loop
  • B
    Program runs once
  • C
    Program runs n number of times where n is the argument given to the function
  • D
    An exception is thrown

Answer

Correct option: A.
Program gets into an infinite loop
(a) Explanation: The program will run until the system gets out of memory.

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free