auto
suggest changeThis storage class denotes that an identifier has automatic storage duration. This means once the scope in which the identifier was defined ends, the object denoted by the identifier is no longer valid.
A block-scope object has automatic storage duration unless it is declared static or _Thread_local, so this keyword is mostly of historical interest and should not be used:
int foo(void)
{
/* An integer with automatic storage duration. */
auto int i = 3;
/* Same */
int j = 5;
return 0;
} /* The values of i and j are no longer able to be used. */
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents