Tags: #sizeof #expectedresults
The size and layout of C++ objects are not alway intuitive.
http://cppisland.com/?p=369
The size and layout of C++ objects are not alway intuitive.
http://cppisland.com/?p=369
C++ Island
sizeof: When The Whole is Greater Than The Sum Of Its Parts
Running the program: Generates this output: The structure A occupies 6 bytes more than the sum of its members. the mystery thickens when we check the output for structure B having the same elemen…