C Program to Write Custom Functions
Get Certified in C Programming and Take Your Skills to the Next Level
Program 1
#include<stdio.h>
#include<conio.h>
void display();
void fact(); // Declare
void main()
{
printf("\n Main Starts...");
display();
fact(); // Calling
printf("\n Main Ends...");
}
void fact() //Defination
{
int f=1,n;
printf("\nEnter a Number");
scanf("%d",&n);
while(n!=0)
{
f=f*n;
n--;
}
printf("\nFactoiral is %d: ",f);
}
void display()
{
printf("\nThis is demo function in C Language");
}
Did we exceed your expectations?
If Yes, share your valuable feedback on Google

