Wednesday, May 31, 2017

What is the difference between 'global' and 'static global' in C?

All static variables, no matter where they are allocated, as well as all global variables, are subjected to "static initialization". They must be initialized by the program before it starts. If you haven't initialized them explicitly, they are implicitly initialized to zero (or NULL for pointers).

No comments :