What is “recursion” in functional programming?

What is “recursion” in functional programming?

a) A function that calls itself
b) A function that modifies a global variable
c) A loop that repeats until a condition is met
d) A function that runs indefinitely

Answer:

a) A function that calls itself

Explanation:

Recursion is a technique in which a function calls itself to solve a problem, commonly used in functional programming to replace loops.

Reference:

Functional Programming Quiz – MCQ Questions and Answers

Scroll to Top