From C Standards#6.2.2p2 Linkages of identifiers:
In the set of translation units and libraries that constitutes an entire program, each declaration of a particular identifier with external linkage denotes the same object or function.
From C Standards#6.2.2p5 Linkages of identifiers
If the declaration of an identifier for a function has no storage-class specifier, its linkage is determined exactly as if it were declared with the storage-class specifier extern. If the declaration of an identifier for an object has file scope and no storage-class specifier, its linkage is external.
So, if in file.c, you have:
int x;
and main.c also you have:
int x;
Both x will represent the same object and external linkage.
From C Standards#6.2.7.p2
All declarations that refer to the same object or function shall have compatible type; otherwise, the behavior is undefined.
Since you have type of x same in both file. So, if you assign some value to any of them and other will represent the same value but if you assign a value to both x then the linker may throw duplicate symbol error because of multiple definitions of x or you may get undefined behavior.
Multiple external definitions is a common extension referenced in informative Annex J in the C Standards.
From C Standards#J.5.11
J.5.11 Multiple external definitions
There may be more than one external definition for the identifier of
an object, with or without the explicit use of the keyword extern; if
the definitions disagree, or more than one is initialized, the
behavior is undefined (6.9.2).
In your case, the definition of x agree, so there is no problem until you are explicitly initializing only one of them.