Are global variables automatically declared as static and initialized to 0? What ANSI says about this?
Thanks for any answer!
Are global variables automatically declared as static and initialized to 0? What ANSI says about this?
Thanks for any answer!
Nothing more to tell about me...
Happy day =)
>Are global variables automatically declared as static and initialized to 0?
If by global variable you mean this:
Then yes, the standard guarantees that a will have static linkage and be initialized to 0.Code:int a; // Global int main() { ... }
p.s. What the alphabet would look like without q and r.