When you have multiple .c source files, you would have a .h header file. In that .h file you would have a declaration of the global variable:
Code:
extern int var;
You would define the variable in one and only one .c file, and use the variable in the other .c file. You would #include the header file in all the .c files that need to define or use the global variable.

The linker would resolve all references to the declaration, definition, and use of the variable during the compile process, to the defined variable.

You really need to study the language before attempting to program using the language. You would learn all these details in one of the boos I have recommended..