Function Program5

#include<stdio.h>

#include<conio.h>


void ahmedabad(); // Function declaration, Function prototype

void vadodara();

void surat();

void patan();


void main()

{

clrscr();


ahmedabad(); // Function calling

vadodara();

surat();

patan();


getch();


}


void vadodara()

{

printf("\nYou are in Vadodara");

surat();

}


void ahmedabad() // Function definition

{

printf("\nYou are in Ahmedabad");

vadodara();  // Recursion Indirect .. Function call itself

}


void surat()

{

printf("\nYou are in Surat");

ahmedabad();

}


void patan() // Function definition

{

printf("\nYou are in Patan");

}


No comments:

Post a Comment