Question 134

What is the size of the union (assume int is 4 bytes)? union U {

What is the size of the union (assume int is 4 bytes)? union U { int i; char c[8]; };
  1. A1 byte
  2. B8 bytes
  3. C12 bytes
  4. D4 bytes
Show answerHide answer

Correct answer: (B) 8 bytes

Explanation

A union's size equals its largest member (8).

From DSSSB TGT Computer Science Full Mock Test 4

This is question 134 of DSSSB TGT Computer Science Full Mock Test 4. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.