Pages

Sunday, 28 January 2018

Function Calls in C Programming Language

Function Calls in C Programming Language

/*Example to understand calling of functions*/
#include<stdio.h>
#include<conio.h>
void abc();
void xyz();
void mno();
main()
{
      printf("I am in main()\n");
      abc();
      printf("Now I am back in main()");
      getche();
      return 0;
}
void abc()
{
     printf("Now I am in abc()\n");
     xyz();
     mno();
}

void xyz()
{
     printf("Now I am in xyz()\n");
}

void mno()
{
     printf("Now I am in mno()\n");
}