Recursion is actually the easy way to do things. But, recursion is
often explained poorly, and explained in a way that makes it seem hard,
so people think it's hard. Deriving a logic for recursive iteration sometimes seems a bit out of the way because it's not linear. It is totally disconnected from our real life and there is no job we do recursively.
Here i have tried to explain recursion in a simple way. Recursion is the call of a function within the function itself thereby putting the function in a recurring pattern.
To find the factorial of a numebr generally we would write:
Code:
#include<stdio.h>
#include<conio.h>
void main()
{
int a,num,fact=1;
printf("Enter the number to find factorial");
scanf("%d",&num);
for(a=1;a<=num;a++)
{
fact*=a;
}
printf("Factorial= %d",fact);
}
Now with recursion this would become ::
Code:
int factorial(int n)
{
if(n == 1)
{
return 1;
}
else
{
return n * factorial(n - 1);
}
}
void main()
{
int num,fact;
printf("Enter the number for factrial");
scanf("%d",&num);
fact=factorial(num);
printf("Factorial= %d",fact);
}

This image shows the implementation of the factorial program using recursion.
As long as n is greater than zero, this function will run recursively; ie, it calls itself with the value of n decreased by 1.The stopping point, is called the base case. A base case is the bottom point of a recursive program, generally the termination and the answer returning point.
All recursive programs have at least one base case which is definite to be attained; otherwise the program would run infinitely. When a function calls itself, a new copy of that function is runin which the local variables in the scope of the second version are independent of the local variables in the first, and they cannot affect one another directly even being parts of the same functions in the same call but in different runs.
Recursion finds great use in stacks and linked lists.