wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Consider the following C declaration:

struct
{
short s[5];
union
{
float y;
long z;
} u;
} t;

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

A
10 bytes
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
22 bytes
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
18 bytes
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
14 bytes
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Join BYJU'S Learning Program
CrossIcon