Coming from a C background, I\'ve always assumed the POD types (eg ints) were never automatically zero-initialized in C++, but it seems this was plain wrong!
For me, POD types are initialized depending on the part of the memory they are placed. Your static int a is allocated on the data segment, so it has a default value on startup. However, I think f is not inizialized in your example...