Vidyalelo
C Programming · Q54

Structure and Union

Programming · C Programming · question 54

Q54

What will be the output of the following C code? #include struct student char *name; ; struct student s[2], r[2]; void main() s[0].name = "alan"; s[1] = s[0]; r = s; printf("%s%s", r[0].name, r[1].name);

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

Answer: Option B

Solution

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