\begin{tabular}{l} Concrete classes that inherit virtual functions \\ but do not override their implementations: \\ Have vtables which are the same as those of their \\ base classes. \\ Receive their own copies of the virtual functions. \\ Receive pointers to their base classes' virtual \\ functions. \\ Receive pointers to pure virtual functions. \\ \hline\end{tabular}
Upstudy AI Solution
Answer
Solution

Sign in to Unlock Answers for Free!
A Learning Platform Trusted by Millions of Real Students and Teachers.

Answered by UpStudy AI and reviewed by a Professional Tutor
The Deep Dive
When it comes to inheritance in C++, if a concrete class inherits virtual functions without overriding them, it retains the vtable of its base class. This means that it can use the behavior defined in the base class directly, keeping things simple and efficient. No additional overhead is added for the vtable since it points to the base class implementations. However, it's important to note that if a derived class overrides a virtual function, it creates a new entry in its vtable, controlling how that function behaves. This can lead to some common mistakes, such as forgetting to override a function that’s meant to be specialized, leading to unexpected behavior or using the base class implementation unintentionally. Always check your intention when designing your class hierarchy!