Initialization of automatic variables
You can initialize any auto
variable except function
parameters. If you do not explicitly initialize an automatic object,
its value is indeterminate. If you provide an initial value, the expression
representing the initial value can be any valid C or C++ expression.
The object is then set to that initial value each time the program
block that contains the object's definition is entered.
Note that if you use the goto
statement to jump
into the middle of a block, automatic variables within that block
are not initialized.
Note:
In C++0x, the keyword

auto
is no longer used
as a storage class specifier. Instead, it is used as a type specifier.
The compiler deduces the type of an auto
variable
from the type of its initializer expression. For more information,
see The auto type specifier (C++0x).Related information