#include main(){ extern int i; i=23; printf("%d",i); }
-
23
-
Prints some address
-
Compilation error
-
Run time error
C
Correct answer
Explanation
The code declares 'i' as extern but never defines it. An extern declaration tells the compiler that the variable exists elsewhere, but without a definition, the linker cannot resolve the symbol. The assignment 'i=23;' attempts to use an undefined external symbol, which causes a linkage error during compilation/linking. Every extern variable must have exactly one definition in some translation unit.