1 2#include <stdio.h> 3 4/* Static and global vars are inited to zero, non-static local vars aren't. */ 5 6int g; 7static int gs; 8 9int main(void) 10{ 11 int l; 12 static int ls; 13 14 if (gs == 0xCAFEBABE) printf("1!\n"); 15 if (g == 0xCAFEBABE) printf("2!\n"); 16 if (ls == 0xCAFEBABE) printf("3!\n"); 17 if (l == 0xCAFEBABE) printf("4!\n"); // complains 18 19 return 0; 20} 21