Mastering C++: 2025 All-In-One Quiz – Ace 'Thinking in C++' with Comprehensive Practice!

Question: 1 / 565

What determines the size difference between objects with and without virtual functions?

The number of functions

The size of the VTABLE

The inclusion of a VPTR

The size of objects with virtual functions is determined by the inclusion of a VPTR (Virtual Pointer), which is a pointer to the virtual table (VTABLE) that is created by the compiler for classes with at least one virtual function. The VTABLE itself is not responsible for the size difference, as it exists regardless of the presence of virtual functions. Similarly, the number of functions or data members do not directly affect the size difference.

Get further explanation with Examzify DeepDiveBeta

The amount of data members

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy