Automatic variable: Difference between revisions

Content deleted Content added
MCWNT (talk | contribs)
C, C++: Removed dead example, the auto keyword cannot anymore be used like that.
Tags: Mobile edit Mobile web edit
No edit summary
Line 5:
 
The term ''[[local variable]]'' is usually synonymous with automatic variable, since these are the same thing in many programming languages, but local is more general – most local variables are automatic local variables, but [[static local variable]]s also exist, notably in C. For a static local variable, the allocation is static (the lifetime is the entire program execution), not automatic, but it is only in scope during the execution of the function.
 
 
==In specific programming languages==
=== C, C++ ===
 
=== C, C++ ===
(Called ''automatic'' variables.)
 
Line 31 ⟶ 29:
 
==See also==
* [[C syntax#Storage class specifiers]]
 
* [[Variable-length array]] ([[C99]] new feature)
* [[C syntax#Storage class specifiers]]
* [[Variable-length array]] ([[C99]] new feature)
 
==Notes==
{{reflistReflist|group=note}}
 
==References==
{{Reflist}}
<references />
 
{{DEFAULTSORT:Automatic Variable}}