Size Of an Object of Inherited Class

Q.What is the size of the object FRIDGE in bytes?

class Kitchen_Products
{ char Model_No[15], C_Name[30];
int year;
protected :
auto float marks;
public:
void Get_It( );
void Show_It( );
};
class Fridge: public Kitchen_Products
{ protected:
int Capacity;
long Price;
char Color[12];
public:
void Read_It( );
void Print_It( );
};

class Stock : protected Fridge
{
int Stock_In_Hand;
public:
int Sold_Num;
void Get_Data( );
void Dis_Data( );
}FRIDGE;
Last edited on
It is implementation-defined.

eg.
Linux, x64, clang++/libc++ 96 bytes http://coliru.stacked-crooked.com/a/542cc05c9a3face9
Windows, x64, microsoft 84 bytes http://rextester.com/IHET42903
Topic archived. No new replies allowed.