What this C++ language-knowledge question tests
This is a medium-difficulty question that probes your understanding of C++ object initialization and default behavior. It rewards close attention to language semantics over guesswork, and is the kind of question quant interviewers ask to separate candidates who read the standard from those who rely on intuition.
To answer it correctly, you need to reason carefully about how C++ handles uninitialized state, default constructors, and what values or behavior result from specific declarations and operations. The question tests whether you can predict program output by understanding the precise rules governing object construction and member initialization in C++.
- Default initialization vs. value initialization
- Uninitialized variables and undefined behavior
- Constructor semantics and member initialization order
- Output stream behavior and type conversions