In the C programming language, an external variable is a variable defined outside any function block. On the other hand, a local (automatic) variable is a variable defined inside a function block.
As an alternative to automatic variables, it is possible to define variables that are external to all functions, that is, variables that can be accessed by name by any function. (This mechanism is rather like Fortran COMMON or Pascal variables declared in the outermost block.) Because external variables are globally accessible, they can be used instead of argument lists to communicate data between functions. Furthermore, because external variables remain in existence permanently, rather than appearing and disappearing as functions are called and exited, they retain their values even after the functions that set them have returned. —The C Programming LanguageRead more about External Variable: Definition, Declaration and The extern
Keyword, Scope, Lifetime and The static
Keyword, Example (C Programming Language)
Famous quotes containing the words external and/or variable:
“Language disguises the thought; so that from the external form of the clothes one cannot infer the form of the thought they clothe, because the external form of the clothes is constructed with quite another object than to let the form of the body be recognized.”
—Ludwig Wittgenstein (18891951)
“There is not so variable a thing in nature as a ladys head-dress.”
—Joseph Addison (16721719)