Vidyalelo
C Programming · Q33

Structure and Union

Programming · C Programming · question 33

Q33

Consider the following declarations: union id char color; int size; ; struct char country; int date; union id id; flag; To assign a color to a flag, the correct statement would be

A.
flag.color = 'W';
Answer
B.
flag.id.color = 'W';
C.
flag.color = 'WHITE';
D.
flag.id.color = 'WHITE';
E.
color.flag = 'W';

Answer: Option A

Solution

Answer: Option A
Solution:

2