Multiple choice

int var1; If a variable has been declared with file scope, as above, can it safely be accessed globally from another file?

  1. Yes; it can be referenced through the register specifier.

  2. No; it would need to have been initially declared as a static variable.

  3. No; it would need to have been initially declared using the global keyword.

  4. Yes; it can be referenced through the publish specifier.

  5. Yes; it can be referenced through the extern specifier.

Reveal answer Fill a bubble to check yourself
C Correct answer