Tuesday, August 20, 2019

Simple program how to define a function and call.

Simple program of how to define a function:


simple program of how to define a function


#include<stdio.h>
#include<conio.h>
void ahmedabad();
void rajkot();
void bhavnagar();
void main()
{
clrscr();
printf("\nI am in Main");
ahmedabad();
rajkot();
bhavnagar();
getch();
}
void ahmedabad()
{
printf("\nYou are in Ahmedabad");
}
void rajkot()
{
printf("\nYou are in Rajkot");
}
void bhavnagar()
{
printf("\nYou are in Bhavnagar");
}

Output:



EmoticonEmoticon