Q.

What happens if the base condition isn’t defined in recursive programs?

A. 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» A. program gets into an infinite loop
Explanation: the program will run until the system gets out of memory.
1.8k
0
Do you find this helpful?
13

Discussion

No comments yet