Technical2026-08-13
What is virtual function
AI-Expanded — inferred from the question title, not from the original candidate report
Explain the concept of a virtual function in C++ and describe how it enables runtime polymorphism through the use of a vtable. Provide a code example demonstrating how a base class pointer can invoke the overridden method of a derived class, and explain why declaring a base class destructor as virtual is essential for preventing memory leaks.
Context & Summary
Personal Interview Round 1
💻 Coding practice works best on desktop.
Code editors are too cramped on mobile screens.
Conceptual Question
This appears to be a conceptual, design, or behavioral question rather than an algorithmic coding problem. The code editor and automated test cases have been disabled for this question.
Back to questions
InterviewDigest