What does the following code write to the monitor?
/* --- fileA.c --- */ int x = 8;
/* --- fileB.c --- */ void foo() { extern int x; x = 99; }
/* --- fileC.c --- */ #include <stdio.h> void foo(); int x; void main() { foo(); printf("%d\n", x ); }
Note that extern
has been removed
from one of the declarations.