Podcast
Questions and Answers
What are the offsets of the structure members d and v?
What are the offsets of the structure members d and v?
The offset of d is 8 bytes and the offset of v is 20 bytes.
What is the total size of the structure in bytes?
What is the total size of the structure in bytes?
The total size of the structure is 24 bytes.
How can the order of structure members be adjusted to minimize the storage space occupied by the structure?
How can the order of structure members be adjusted to minimize the storage space occupied by the structure?
To minimize storage space, the order should be: char c, short s, int i, long l, double d, void *v.
For the expressions x/4+y/8==(x>>2)+(y>>3) and x4+y8==(x<<2)+(y<<3), when are they always true?
For the expressions x/4+y/8==(x>>2)+(y>>3) and x4+y8==(x<<2)+(y<<3), when are they always true?
Signup and view all the answers
When the expression x4+y8==(x<<2)+(y<<3) is false, what are the possible values of x and y?
When the expression x4+y8==(x<<2)+(y<<3) is false, what are the possible values of x and y?
Signup and view all the answers