#include /* The following explicit declaration of variable a as extern tells the compiler to look for the declaration of this variable elsewhere on the same file above this place or on other files CC -c a*.c => a1.o, a2.o CC a*.o -o a => a The order of object files for the link command has no significance */ extern int a, b, c; /* variables a, b, c are declared as external */ int b; /* global variable b - can be accesed from any file */ int c = 8; main() { extern int c, d; a = 15; b = 20; cout << " a = " << a << endl << " b = " << b << endl; cout << " c = " << c << endl << " d = " << d << endl; }