Difficulty: Easy
Correct Answer: External, Internal and None
Explanation:
Introduction / Context:In C, linkage describes whether multiple declarations refer to the same entity across scopes and translation units. Understanding linkage is key to organizing headers and source files, avoiding multiple-definition errors, and intentionally restricting visibility of symbols.
Given Data / Assumptions:
Concept / Approach:
Step-by-Step Solution:
Map examples to linkage: 'int g;' (external), 'static int g;' (internal), 'int x' inside a block (no linkage).Recognize that all three categories exist in the language standard.Therefore, the correct choice is 'External, Internal and None'.Verification / Alternative check:
Link two files that declare the same non-static function → they refer to one function (external). Make a function 'static' → calls from another file fail (internal). Local variables of the same name in different functions are independent (no linkage).Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:
External, Internal and None
Discussion & Comments