✏️ Explanatory Question

How is recursion different from a normal function call?

👁 13 Views
📘 Detailed Answer
🟢 Easy
💡

Answer with Explanation

In a normal function call, one function calls another function. In recursion, a function calls itself.

Normal Function Call Recursive Function Call
A function calls another function. A function calls itself.
Example: A() calls B() Example: recur() calls recur()
void A() {
    B();   // normal function call
}

void recur() {
    recur();   // recursive call
}