A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Discussion Forum

Que. Consider the following C declaration

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

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
a. 22 bytes
b. 14 bytes
c. 18 bytes
d. 10 bytes
Answer:18 bytes
Confused About the Answer? Ask for Details Here
Know Explanation? Add it Here

Similar Questions:



View All Questions on: Data Types and Abstraction