This is an online C++ test question, which has been done.
#include using namespace std; class A { }; class B { int i; }; class C { void
Size of int with padding and the virtual function =18 bytes
simple function bytes =1 virtual function =8
And you cant simply add all the bytes there is concept of padding check it out on google.
Declaring in different order change the size of class