Mastering C++: A Comprehensive Quiz Based on 'Thinking in C++'

Disable ads (and more) with a membership for a one time $2.99 payment

Test your C++ skills with our quiz based on Bruce Eckel's 'Thinking in C++'. Dive into object-oriented programming, advanced topics, and fundamentals. Perfect for learners and experts alike. Assess your knowledge and become a C++ master!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


What does internal linkage imply for a name at file scope declared static?

  1. The name can be used in other translation units without clashing

  2. The name is only visible within the translation unit

  3. The name gets external linkage

  4. The name cannot be used within the translation unit

The correct answer is: The name is only visible within the translation unit

Internal linkage for a name at file scope means that the name is only visible within the translation unit in which it was declared. This means that the name cannot be accessed or used in other translation units, making options A and C incorrect. Option D is also incorrect as the name can still be used within the same translation unit, just not outside of it. Option B is the most accurate as it describes the limitations of using a name with internal linkage.