What should the code print? 0 or any garbage value or will it depend on the compiler?
#include <stdio.h> int a; int main() { printf("%d ",a); return 0; }
the answer is 0. Global variables are initialized to zero.
1.4m articles
1.4m replys
5 comments
56.9k users