By default, all outermost (i.e. non-local) items have external linkage, meaning they are available from the point of definition throughout the entire reamining text of the program, even across subsequently-compiled files. This is therefore the default for all functions and all outer level variables (i.e those declared outside any function, including main). These items are ``globals''.
You can over-ride this by using ``static''.
Notes
1. Functions can be made static. This makes their names unavailable outside the file (which is how you can hide them even when they are indirectly used from outside).
2. If a variable is defined within an inner block as a static, then its scope is the block (so it cannot be named outside the block) but its linkage is external (its extent is the entire program). Hence it retains its value outside the block and this value is still available when the block is next entered. For example, you can use such a variable to count how many times a procedure is called, using a variable inside the procedure. [Static variables are thus definitely not automatics.]
maspjw@