Visiting Hours
What this preview is
Visiting Hours is a hard quant interview question on language knowledge in Cpp.
- Difficulty
- Hard
- Topic
- Language Knowledge
- Discipline
- Quant development
- Language
- Cpp
- Companies
- 0
What this C++ language-knowledge question tests
This is a hard C++ question that probes deep familiarity with the language's scoping rules, object lifetime, and how references interact with temporary values. It rewards careful reading of code semantics over guesswork, and is the type of question that separates candidates who have worked extensively in C++ from those who rely on surface-level intuition.
To solve it, you need to trace through the execution carefully, paying close attention to variable scope, constructor and destructor timing, and the validity of references or pointers after certain operations. These are precisely the pitfalls that lead to subtle bugs in production systems, especially in latency-sensitive environments where memory safety and predictable behaviour are critical.
- Object lifetime and scope rules
- Reference binding and dangling references
- Constructor and destructor invocation order
- Temporary object semantics
Related practice
Unlock full access to getcracked
Join to unlock this question, detailed solutions, and our complete library of quant finance interview prep.