The program when run in CodeBlocks Compiler gives 4 12 as output
This can be explained as; for base class size of object is equal to size of int.
For derived class; size of object = size of the class + size if base class + size of virtual base pointer(4).