This question evaluates a candidate's understanding of C++ object-oriented polymorphism and interface design, including distinctions between virtual and pure virtual functions, dynamic dispatch via the vtable, overriding semantics, abstract class formation, and lifecycle concerns for constructors and destructors.

In C++, what is the difference between a virtual function and a pure virtual function? Provide syntax examples, describe dynamic dispatch via the vtable, and explain how overriding works. When does a class become abstract, and can a pure virtual function still have a definition? Discuss whether constructors or destructors should be virtual, implications for resource management, and guidelines on when to use each in interface design.