99
Comments:
This is logically identical to the previous puzzle.
The extern
declarations of x
in fileC.c was not needed.
There is just one object x
,
which is referred to in all three files.
The object x
is initialized to 8,
but then the call to foo()
changes it to 99.
/* --- fileA.c --- */ int x = 8
/* --- fileB.c --- */ foo() { extern int x; x = 99; }
/* --- fileC.c --- */ int x; main() { foo(); printf("%d\n", x ); system("pause"); }