JAVA:
Assume a machine with a 4-byte word and word alignment. Charuses 1 byte, long int uses 4, and short int uses 2.
a) Determine the size in bytes of the following dataclasses.
b) Rearrange them so they use less space and indicate their newsize in bytes.
class myData { short int streetNum;
long int apartMentNum;
short int blup;
char oink[8];
};
JAVA: Assume a machine with a 4-byte word and word alignment. Char uses 1 byte, long int uses 4, and short int uses 2. a
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am