Vidyalelo
C Programming · Q181

Structure and Union

Programming · C Programming · question 181

Q181

What will be the output of the following C code? #include struct student char *c; struct student *point; ; void main() struct student s; struct student m; s.c = m.c = "hi"; m.point = &s; (m.point)->c = "hey"; printf("%s %s ", s.c, m.c);

A.
hey hi
Answer
B.
hi hey
C.
Run time error
D.
hey hey

Answer: Option A

Solution

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