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
Join The Discussion