What will happen in the following C++ code? extern void display(); int main() { display(); }?
Show answer
Correct answer C
The extern keyword declares a function without providing its definition. display() is called in main, but the compiler cannot find its actual implementation. Compilation passes the syntax check, but linking fails. The linker reports an undefined reference error.