

InterviewSolution
Saved Bookmarks
1. |
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 thrownThis question was addressed to me in final exam.My question is based upon Recursion topic in chapter Argument Passing, Global vs Local Variables, Shallow copy vs Deep copy and Recursion of Python |
Answer» CORRECT option is (a) Program GETS into an INFINITE loop The explanation is: The program will RUN until the system gets out of memory. |
|