8
Comments:
There is a single external entity that corresponds to the identifier x
.
The keyword extern
is not needed in file fileC.c,
but makes clear that its x
is external.
/* --- fileA.c --- */ int x = 8
/* --- fileB.c --- */ foo() { int x; x = 99; }
/* --- fileC.c --- */ extern int x; main() { foo(); printf("%d\n", x ); system("pause"); }