Logo

Question preview

Let's link up.

What this preview is

About this preview

Let's link up. is a easy quant interview question on language knowledge in Cpp.

Unlock full access to getcracked

Join to unlock this question, detailed solutions, and our complete library of quant finance interview prep.

Understanding C++ linkage and variable scope

This is an easy C++ question that tests your knowledge of linkage—a core concept in how the compiler and linker resolve global variable declarations across translation units. It's the kind of foundational question that appears in technical interviews to confirm you understand how C++ manages symbol visibility at the language and linking levels.

The question asks you to distinguish between keywords that alter a global variable's default external linkage (making it internal to a single translation unit) versus those that do not. To answer it correctly, you need to be familiar with how C++17 handles namespace scope, the static keyword, anonymous namespaces, and related mechanisms for controlling linkage visibility.

  • External vs. internal linkage in C++
  • Translation unit boundaries
  • The static keyword and unnamed namespaces
  • Storage class specifiers and their linkage effects