Recursion in C

The Recursion refers to a situation when a function calls itself directly or indirectly.In direct recursion,Function calls itself.And in indirect recursion,Function calls other function and its calls back first function.C supports Recursion and it is useful in many programs like a program to find a factorial of any number by using recursion.Following is a program created with a recursive function from which we can print the factorial of any number.
Factorial: Suppose we want to find a factorial of any number N.Then factorial of number N can be given as n*(n-1)*(n-1)*(n-1)*(n-1)......[n-(n-1)].For example we want to find a factorial of 5 then it will be 5*4*3*2*1=120.

Program:

#include<stdio.h>
#include<conio.h>
int fact(int);
main()
{
    int n,ans;
    clrscr();
    printf("Enter number: ");
    scanf("%d",&n);
    ans=fact(n);
    printf("\nFactorial of %d is %d",n,ans);
    getch();
}
int fact(int x)
{
    if(x==1)
    {
        return 1;
    }
    else
    {
        x*=fact(x-1);
        return x;
    }
}