A

Admin • 833K Points
Coach

Q. Assume that objects of the type short, float and long occupy 2 bytes, 4 bytes and 8 bytes, respectively. The memory requirement for variable t, ignoring alignment considerations, is

Code:
struct {
short s[5];
union {
float y;
long z;
}u;
} t;
  • (A) 22 bytes
  • (B) 14 bytes
  • (C) 18 bytes
  • (D) 10 bytes
  • Correct Answer - Option(C)
  • Views: 21
  • Filed under category C Programming
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.