1.

Which is the most appropriate definition for recursion?(a) A function that calls itself(b) A function execution instance that calls another execution instance of the same function(c) A class method that calls another class method(d) An in-built method that is automatically calledI have been asked this question in semester exam.The above asked question is from Recursion topic in chapter Argument Passing, Global vs Local Variables, Shallow copy vs Deep copy and Recursion of Python

Answer» RIGHT answer is (b) A FUNCTION execution instance that CALLS another execution instance of the same function

The EXPLANATION is: The appropriate definition for a RECURSIVE function is a function execution instance that calls another execution instance of the same function either directly or indirectly.


Discussion

No Comment Found

Related InterviewSolutions