3.6.2 / 1 says that "Objects with a static storage duration (3.7.1) must be initialized with zeros (8.5) before any other initialization occurs."
So, you are right, they are not initialized by default. But they are zero-initialized, which is actually the same thing for int . For a class type, this is not necessarily the same thing.
However, I do not promise that the behavior here is simply that the initialization order is unspecified, and therefore one variable ends as 10, and the other 20, but not specified, which is. It may be undefined for some other reason, but I can't think of anything.
source share