Logo

Question preview

It's a simple struct.

What this preview is

About this preview

It's a simple struct. 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++ struct-size interview question tests

This is an easy C++ question that probes whether you understand memory layout, alignment rules, and how the compiler packs data members into structs on a 64-bit architecture. Quant firms ask questions like this to confirm that candidates have concrete knowledge of low-level behavior rather than relying on intuition.

To answer correctly, you need to know how the compiler aligns individual member types, how padding works, and whether any special attributes or packing directives are in play. The question rewards careful observation of the actual struct definition and application of standard C++ alignment rules.

  • Fundamental type sizes and alignment requirements
  • Padding and struct member ordering
  • 64-bit architecture conventions
  • Compiler packing behavior