How Much More New?
What this preview is
How Much More New? is a easy quant interview question on language knowledge in Cpp.
- Difficulty
- Easy
- Topic
- Language Knowledge
- Discipline
- Quant development
- Language
- Cpp
- Companies
- 0
What this C++ memory-allocation question tests
This is an easy question that checks whether you understand how the new operator allocates memory in C++, and how array allocation differs from scalar allocation. It is a quick diagnostic for foundational language knowledge rather than algorithmic thinking.
The question asks you to trace through a code snippet and reason about the exact number of bytes requested at the point of allocation. Success requires familiarity with C++ type sizes, array syntax, and the semantics of new. Interviewers often use this kind of question early in a conversation to establish baseline competence before moving to more complex logic or system design.
- Scalar vs. array allocation with
new - Type sizes and the
sizeofoperator - Pointer semantics and memory layout
Related practice
Unlock full access to getcracked
Join to unlock this question, detailed solutions, and our complete library of quant finance interview prep.