
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.