I have the following C++ code:
class A {
private:
long num1;
};
class B : public A {
private:
void f1();
};
class C: public B {
private:
virtual void f2();
};
int main()
{
cout <<sizeof(A)<<endl;
cout <<sizeof(B)<<endl;
cout<<sizeof(C)<<end;
}
Would someone please help me with the output and please explain? Thanks!