ProgrammingHardIBM · Deloitte pattern

Which identifier, even though declared at file scope, never has linkage at all in C?

  1. A. A plain global int variable
  2. B. A static global variable
  3. C. An enumeration constant (an enumerator from an enum)
  4. D. A function declared extern

Correct answer: C. An enumeration constant (an enumerator from an enum)

Enumerators are compile-time constants substituted wherever used; the standard explicitly states they have no linkage. A global variable always has some linkage (external by default, internal with static), and functions default to external linkage.

More C Programming questions

Exams that ask this topic