Difference Between Recursion and Iteration

Difference Between Recursion and Iteration in Tabular Form

The concept of Recursion and Iteration is to execute a set of instructions repeatedly. The key difference between recursion and iteration is that recursion is a process to call a function within the same function while iteration is to execute a set of instructions repeatedly until the given condition is true.

Comparison Chart

Recursion is like piling all of those steps on top of each other and then quashing them all into the
In iteration, a problem is converted into a train of steps that are finished one at a time, one after
In recursion, each step replicates itself at a smaller scale, so that all of them combined together
eventually, solve the problem.
With iteration, each step clearly leads onto the next, like stepping stones across a river
Not all recursive problem can be solved by iterationAny iterative problem is solved recursively
It uses StackIt does not use Stack
Small Line Of CodeLarge Line of Code
Slow PerformanceFast Performance
Recursion is always applied to functions.Iteration is applied to iteration statements or “loops”.


  • A procedure that contains a procedure call to itself or a procedure call to a second procedure which eventually causes the first procedure to be called is known as a recursive procedure.
  • There are two important conditions that must be satisfied by any recursive procedure
  1. Each time a procedure calls itself it must be nearer in some sense to a solution
  2. There must be a decision criterion for stopping the process or computation

C program for GCD using recursion

Iteration Factorial Program

Related Differences:


Please enter your comment!
Please enter your name here