what is the size of this class class size { public: char data1; double d; int data2; char data3; double data4; short data5; }; please explain the padding for these double variables.
absolutely correct navvy agreed !! just a minor change short : 2 bytes + 2 byte padding