Ace Your C++ Skills 2025 – Rock the ‘Thinking in C++’ Challenge!

Question: 1 / 565

What type of linkage does the static variable 's' have within the 'oneChar' function?

Internal linkage

External linkage

No linkage

Static variables have no linkage, meaning they can only be accessed or modified within the function in which they are declared.

Option A is incorrect because internal linkage refers to variables that can only be accessed within the same translation unit, not just within the same function.

Option B is incorrect because external linkage refers to variables that can be accessed in other translation units.

Option D is incorrect because public linkage is not a type of linkage for variables.

Get further explanation with Examzify DeepDiveBeta

Public linkage

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy