Hello Guys!
I know that the initial value of a global variable is zero. Is It correct?
But, What's the wrong with this code? x is defined as global variable but It's value in f1 is not zero! why? please help.
Code:#include <stdio.h> #include <conio.h> int x; void f1 (void); int main () { x = 100; f1 (); f2 (); printf ("\n in main x is: %d", x); getch (); return 0; } void f1 (void) { printf ("\n in f1 x is : %d\n", x); }