Multiple choice

What type of error will occur while running the following program?

void main() { extern int t; t =100; printf(Value of t = %d,t); }

  1. Linker error

  2. Compilation error

  3. Runtime error

  4. No error

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Here, 't' is the external variable and specifies to the compiler that the memory for 't' is allocated in some other program. Hence, linker error has occurred.