11.2.1 Auto and Non-Auto Variables vs. Local and Global Variables
The terms “local” and “global” are commonly used to describe variables, but are not defined by the language standard. The term “local variable” is often taken to mean a variable which has scope inside a function and “global variable” is one which has scope throughout the entire program. However, the C language has three common scopes: block, file (i.e., internal linkage) and program (i.e., external linkage). So using only two terms to describe these can be confusing.
For example, a static
variable defined outside a
function has scope only in that file, so it is not globally accessible, but it can be
accessed by more than one function inside that file, so it is not local to any one
function either.