In the following C code, we can access the 1st character of the string sval by using . . . . . .
#include <stdio.h>
struct
{
char *name;
union
{
char *sval;
} u;
} symtab[10];
. .
#include <stdio.h>
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: Option D
Related Questions on Structure and Union
Which of the following can be a member of a structure?
A. Function
B. Another structure
C. Enumeration
D. All of the above

Join The Discussion