The extern keyword tells the compiler that a variable is declared in another source module (outside of the current scope).
The correct answer: 77, by default const implies an internal scope, so if we had a declaration in both files without extern, there would be a compilation error - "in file2.cpp a constant without initialization is declared".
extern makes the constant scope externally visible - so the value a = 77.
Login in to like
Login in to comment