The set of all global variables is known as the global environment or global state. Data segment in computing, a data segment (often denoted.data) is a portion of an object file or the corresponding address space of a program that contains initialized static variables, that is, global variables and static local variables. In computer science, a local variable is a variable that is given local scope
Naked Attraction (2016)
A local variable reference in the function or block in which it is declared overrides the same variable name in the larger scope
In programming languages with only two levels of visibility, local variables are contrasted with global variables
While the term can refer to global variables, it is primarily used in the context of nested and anonymous functions where some variables can be in neither the local nor the global scope. Variable lifetime is contrasted with scope (where a variable can be used) Global and local refer to scope, not lifetime, but scope often implies lifetime In many languages, global variables are always static, but in some languages they are dynamic, while local variables are generally automatic, but may be static.
External variable in the c programming language, and its predecessor b, 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.