In
computer programming, an
automatic variable is a local
variable which is allocated and deallocated automatically when program flow enters and leaves the variable's scope. The scope is the lexical context, particularly the function or block in which a variable is defined. Local data is typically (in most languages) invisible outside the function or lexical context where it is defined. Local data is also invisible and inaccessible to a
called function, but is not deallocated, coming back in scope as the execution thread returns to the caller.