Multiple choice general knowledge

The following variable is available in file1.c, who can access it?: static int average;

  1. Function declared static in the file1.c can access the variable

  2. All the functions in the file1.c can access the variable

  3. None of the options

  4. No function in file1.c can have access

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

A static variable at file scope (outside any function) has internal linkage - it's visible to all functions in the same file but not to other files. Option B correctly states that all functions in file1.c can access it. Option A is incorrect because there's no requirement for functions to be declared static.