[5]Consider a C struct that includes the following members: struct foo { char a; bool b; int c; double d; short e; float f; double g; char *cptr; float *fptr; int x; }; Note that for C, the compiler...

[5]Consider a C struct that includes the following members:

struct foo {


char a;


bool b;


int c;


double d;


short e;


float f;


double g;


char *cptr;


float *fptr;


int x;


};


Note that for C, the compiler must keep the elements of the struct in the same


order as given in the struct definition. For a 32-bit machine, what is the size of the


foo struct? What is the minimum size required for this struct, assuming you may


arrange the order of the structmembers as youwish?What about for a 64-bitmachine?




May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here