Recursion is a programming technique that allows the programmer to express operations in terms of themselves. In C, this takes the form of a function that calls itself. A useful way to think of recursive functions is to imagine them as a process being performed where one of the instructions is to "repeat the process".
int f=1;//initialize to 1
int fact(int i)
printf("Enter number to find factorial:");
printf("Factorial of %d is %d",n,ans);