Vidyalelo
C Programming · Q61

Structure and Union

Programming · C Programming · question 61

Q61

In the following C code, we can access the 1st character of the string sval by using . . . . . . #include struct char *name; union char *sval; u; symtab[10];. .

A.
*symtab[i].u.sval
B.
symtab[i].u.sval[0].
C.
You cannot have union inside structure
D.
Both *symtab[i].u.sval & symtab[i].u.sval[0].
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board