1 / 4
Aug 2016

This is because of Padding. Depending on the machine the word size may vary, your machine has a word size of 4 bytes meaning it would pad the extra number bytes for each data entry to be able read word chunks while performing operations.

double a; 8 Bytes ( No Padding Required as multiple of 4 )
char b; ( 1 Bytes , Requires 3 Bytes of Padding )
double c; 8 bytes ( No Padding required )
int d; ( 4 Bytes )

8 + 1 + 3 + 8 + 4 = 24

Suggested Topics

Topic Category Replies Views Activity
Off-topic 1 80 Apr 9

Want to read more? Browse other topics in Off-topic or view latest topics.