#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 gcc -ansi -c a*.c => a1.o, a2.o gcc -ansi 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; printf(" a = %d\n b = %d\n c = %d\n d = %d\n", a, b, c, d); }