ForNext
Only Do What Only You Can Do
012. value of uninitialized primitive types
Hyperpolyglot C++ Style Languages: C++, Objective C, Java, C# より (2012.05.08)
VBScript
JScript
Perl
PHP
Python
Ruby
PowerShell
Scala
F#
C
C++
same as C. However, C++ provides a no-argument constructor for each primitive type which zero-initializes it.
C++Builder
VC++
C#
compiler prevents use of uninitialized variables in some circumstances, and zero-initializes in others
Java
zero-initialized
Objective-C
stack variables and heap variables allocated with malloc have indeterminate values. Global and static variables and heap variables allocated with calloc are zero-initialized.