Logo

Question preview

It's shared, but is it big?

What this preview is

About this preview

It's shared, but is it big? is a easy quant interview question on language knowledge in Cpp, asked at Quant.

Unlock full access to getcracked

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

What this C++ memory-layout question tests

This is an easy question about how C++ allocates and sizes shared objects in memory. It appears regularly in quant interviews because traders and systems engineers need to reason precisely about memory footprints—especially when designing low-latency data structures or inter-process communication buffers.

To answer correctly, you need to understand how the compiler lays out class members, respects alignment rules on a 64-bit architecture, and accounts for any special properties of shared objects. The question rewards careful attention to the C++ memory model rather than deep algorithmic insight.

  • Struct and class layout, padding, and alignment
  • Effect of access specifiers and inheritance on size
  • Platform-specific pointer and integer widths