- A function is defined to be a self-contained program which is written for the purpose of accomplishing some task.
- Function is reusable block of code that makes a program easier to understand, test and can be easily modified without changing the calling program.
C program to find factorial :-
#include< stdio.h >
void factorial (int)
printf(“Enter a number:”)
printf(“factorial of %d is %d \n”number,fact);
void factorial(int n)