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
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