Question: Q 3 . For the structure declaration: struct { char * a; short b; double c ; chard; float e; char f; long Jeag g

Q3. For the structure declaration:
struct {
char * a;
short b;
double c;
chard;
float e;
char f;
long Jeag g :
void ?**h;
} foo;
Suppose the structure was compiled on a 32-bit Windows or a 32-bit UNIX
machine, where each primitive data type of K bytes must have an offset that
is a multiple of K.
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. [10 marks]
 Q3. For the structure declaration: struct { char * a; short

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!