/* Global variable are known throughout the program and may be used by any piece of code. */ #include int count; //count is global void func1(void); //function prototype void func2(int count); //function prototype int main(void) { count = 100; func1(); //function invocation printf("main: count is %d\n", count); return 0; } // function definition void func1(void) { int count=10; func2(count); //function invocation printf("func1: count is %d\n", count); } //function definition void func2(int count) { int i; for (i = 0; i < count; i++) putchar('.'); printf("\nfunc2: count is %d\n", count); }