May 2003
Intermediate to advanced
808 pages
32h 24m
English
auto storage class — Automatic variable specifier
storage-class-specifier := autoThe auto storage class
specifier declares a local variable to be automatic. The object is
constructed when execution reaches the variable’s declaration, and the
object is destroyed when execution leaves the scope where it is
declared.
All local variables and function parameters are auto by default, so the explicit auto specifier is rarely used.
int foo(autoint parm) {autoint sqr = parm * parm; return sqr; }
declaration, register, Chapter 2