Global variables in C are static or not. Stackoverflow.com DA: 17 PA: 50 MOZ Rank: 69. Global variables in C are by default extern. (i.e) they have external linkage. To restrict the external linkage, 'static' storage class specifier can be used for the global variable.. if static specifier is used, then the variable has file scope.
The One Definition Rule (ODR) still applies, meaning that you can only have one definition of the global variable visible at link-time (static or dynamic linking). So, the key issue here is really visibility. In all cases, static global variables (or functions) are never visible from outside a module (dll/so or executable). The C++ standard ...