What is the initial value of a variable before it being assigned a value? For different variable types, I have different initial values:
- (
unsigned
)int
or (unsigned
)long
orbool
(also arrays): 0 - (
unsigned
)long long
: 1 float
: 0double
: 4.94066e-324long double
: 1.79581e+2383- (
unsigned
orsigned
)char`: (doesn't output anything) double array
: 3.23796e-319string
:(unpredictable(random) value)- ...
So why is default initial value like this for different var type?