Global Scope

C A name has global scope if the identifier's declaration appears outside of any block. A name with global scope and internal linkage is visible from the point where it is declared to the end of the translation unit.

C++A name has global namespace scope if the identifier's declaration appears outside of all blocks, namespaces, and classes. A name with global namespace scope and internal linkage is visible from the point where it is declared to the end of the translation unit.

A name with global (namespace) scope is also accessible for the initialization of global variables. If that name is declared extern, it is also visible at link time in all object files being linked.

Related References

IBM Copyright 2003