Program to show Nested User Defined Function in C


#include
int func1(void);
int func2(void);
int func3(void);
int x;
main()
{
x=10;
printf("Starting Value of x= %d\n", x);
prinf("x= %d\n", func1());
prinf("x= %d\n", func2());

prinf("x= %d\n", func3());
getch();
}
func1(void)
{
x+=10;
}
int func2(void)
{
int x;
x=1;
return(x);
}
func3(void)
{
x=x+10;
}



No comments:

Post a Comment