C++ Basics: const vs static, Non-Virtual Base Destructors, and Stack vs Heap Memory
Company: AMD
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Onsite
Overview: Three C++ fundamentals questions: how const and static variables differ, what happens when a derived object is deleted through a base-class pointer whose destructor is not virtual, and how stack and heap memory differ. It tests precise knowledge of storage duration, linkage, object lifetime and undefined behavior.
Read the full AMD Software Engineer interview experience this question came from