Question: Answer the following for the structure declaration A. What are the byte offsets of all the fields in the structure? B. What is the total
Answer the following for the structure declaration

A. What are the byte offsets of all the fields in the structure?
B. What is the total size of the structure?
C. Rearrange the fields of the structure to minimize wasted space, and then show the byte offsets and total size for the rearranged structure.
struct { int *a; float b; char C; short d; long e; double f; int char } rec; g; *h;
Step by Step Solution
3.45 Rating (148 Votes )
There are 3 Steps involved in it
This is an exercise in understanding structure layout and al... View full answer
Get step-by-step solutions from verified subject matter experts
