Multiple choice technology programming languages

Static global variable in one c++ file can be used in another c++ file with the help of extern keyword.

  1. True

  2. False

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

Static global variables have file scope and internal linkage. They cannot be accessed from another file using extern because extern is for variables with external linkage. Static at file scope specifically restricts visibility to the current translation unit.