Vidyalelo
C Programming · Q48

Structure and Union

Programming · C Programming · question 48

Q48

What will be the output of the following C code? #include struct student char *name; ; struct student fun(void) struct student s; s.name = "alan"; return s; void main() struct student m = fun(); printf("%s", m.name);

A.
Nothing
B.
alan
Answer
C.
Run time error
D.
Varies

Answer: Option B

Solution

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