#include // A global variable in this file: int i; // A global variable from another file: extern int j; // Attempt to access j2, declared as static in the other file: extern int j2; int main () { i = 5; // Access the file variable, as usual. printf ("i = %d\n", i); j = 6; // Access the other file's variable. printf ("j = %d\n", j); j2 = 7; // Attempt to access j2. printf ("j = %d\n", j2); }