I want to know why exactly static variables in C, C++ and Java are initialized by zero by default? And why this is not true for local variables?
I have no idea about java and I doubt it's different for statics/locals in java.
As for c and c++, it's about programmers caring about their code effect and loving being in control. Initializing local variables would imply execution of extra code each time program enters the scope. For frequently called functions that may be a disaster.