Statement of C Program : This Program prints the Messages or Instructions when different Functions calls:
#include<stdio.h>
void England(); /* Function declaration */
void Australia(); /* Function declaration */
void India(); /* Function declaration */
{
printf(" I am in main\n");
England(); /* Function call */
Australia(); /* Function call */
India(); /* Function call */
return(0);
}
void England() /* Function definition */
{
printf(" I am in England\n");
}
void Australia() /* Function definition */
{
prinf(" I am in Australia\n");
}
void India() /* Function definition */
{
printf(" I am in India\n");
}
Output:
I am in main
I am in England
I am in Australia
I am in India
Note: Number of Conclusions drawn from the above Program:
- A C Program is a collection of one or more Function or you can say A Function is a basic building block of C program.
- If a C program contain only one Function, then it must be main(), because Program execution always begins with main().
- In C program, as many number of Functions exist i.e there is no limit on the number of Functions.
- Control returns to main() after each Function has doing its work or thing.
- The Program ends, when main() runs out of statements and Function calls.
That's All
0 Response to "WAP of C Language that calls many Functions"
Post a Comment