Recursion in C
Recursion occurs when a function calls itself.
A recursive function normally needs:
- A base condition
- A recursive call
Example
Factorial of a number can be defined recursively.
5! = 5 × 4 × 3 × 2 × 1
The base condition prevents infinite recursive calls.