Logo

Question preview

Replace all the functions!

What this preview is

About this preview

Replace all the functions! is a cooked 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.

What this C++ language-feature question tests

This is a straightforward C++ language knowledge question that probes familiarity with compiler optimisation directives. It asks you to identify the keyword that instructs the compiler to eliminate the overhead of a function call by substituting the function body directly into the calling code.

Understanding this mechanism is fundamental to writing performant C++ in latency-sensitive environments. Quant trading systems often rely on these low-level optimisations to keep inner loops tight. The question rewards precise knowledge of the language rather than deep algorithmic thinking.

  • Inline function semantics and when the compiler honours the directive
  • Trade-offs between code size and execution speed
  • Compiler heuristics for inlining decisions