The book "Programming in C" by Stephan Kochan (3rd Edition 2004), states:
One final thing about global variables. They do have default initial values: zero. So, in the global declaration
all 100 elements of theint gData[100];
gData
array are set to zero when the program begins execution. So remember that while global variables have default initial values of zero, local variables have no default initial value and so must be explicitly initialized by the program.
On the other hand, discussions on the Internet say global variables would be indetermined or may be luckily set to zero but not necessarily.
Which is true?
Related question: local variable initialized to zero in C