c program to find the factorial using recursion

Programming Example

Write program to compute factorial of a user input number using recursive function.


int factorial(int);
int main()
	int num,ans;
	printf("Enter any number : ");
	printf("Factorial of %d is : %d",num,ans);
	return 0;
int factorial(int n)
		return 1;
		return n*factorial(n-1);

Enter any number : 5

Factorial of 5 is : 120

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Website development Company in Allahabad