What is recursion in C? | Eklavya Online

What is recursion in C?

When a function calls itself, and this process is known as recursion. The function that calls itself is known as a recursive function.

Recursive function comes in two phases:

  • Winding phase
  • Unwinding phase
  • Winding phase: When the recursive function calls itself, and this phase ends when the condition is reached.
  • Unwinding phase: Unwinding phase starts when the condition is reached, and the control returns to the original call.