Internal linkage

From cppreference.com
< c‎ | language

Within one translation unit, each declaration of an identifier with internal linkage denotes the same object or function.

If the declaration of a file scope identifier for an object or a function contains the storage-class specifier static, the identifier has internal linkage.

[edit] Notes

Code in other translation units cannot access objects and functions with internal linkage.

The other use of the keyword static is static storage duration.

[edit] Example

Identifiers a and f have internal linkage.

#include <stdio.h>
 
static int a = 1;
 
static void f (void) {printf("from function f()\n");}
 
int main(void)
{
    f();
 
    return 0;
}
/* end of this translation unit */

Possible output:

from function f()