Question: Given this struct on a 32-bit architecture, what is sizeof(struct thestruct)? struct thestruct { int A; int B:1; char* C; double d; }; ------------------------------------------------- What

Given this struct on a 32-bit architecture, what is sizeof(struct thestruct)?

struct thestruct { int A; int B:1; char* C; double d; }; -------------------------------------------------

What is the size of each element in (struct thestruct)?

struct thestruct { int A; int B:1; char* C; double d; }; -------------------------------------------

What ordering of items in (struct thestruct) would result in the smallest struct size?

struct thestruct { int A; int B:1; char* C; double d; }; ----------------------------------------------------

What would be the sizeof(struct thestruct) if you optimized it for smallest size?

struct thestruct { int A; int B:1; char* C; double d; };

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!