1. extern
The extern keyword tells the compiler that a variable or function is defined elsewhere, possibly in another file. As long as the variable or fucntion is not declared as static.
// file1.c int counter = 0; // file2.c extern int counter; // refers to the same counter defined in file1.c extern void print_result(); // function defined in another file
// It is still global (lives the whole program), but only visible within that file. static int count = 0;