This question evaluates a candidate's understanding of C++ language and runtime fundamentals — covering standard container implementations and performance trade-offs, causes of segmentation faults and memory-safety issues, and the object model behind virtual dispatch — and is commonly asked to probe low-level reasoning about memory layout, performance characteristics, and debugging ability in systems and software engineering contexts. It tests both conceptual understanding (vtable/vptr mechanics, construction/destruction semantics, single vs multiple inheritance implications) and practical application (container selection and diagnosing memory errors) within the domain of software engineering fundamentals and systems programming.
Answer the following C++ conceptual questions:
std::vector
,
std::list
,
std::map
, and
std::unordered_map
:
virtual
? Why or why not?
Login required