Vidyalelo
C Programming · Q177

Structure and Union

Programming · C Programming · question 177

Q177

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

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

Answer: Option A

Solution

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