Which is the most appropriate definition for recursion?

Giang Phạm

New member
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 called
 
Answer: b
Explanation: 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.
 

Tìm kiếm

Back
Top