Vidyalelo
C Programming · Q83

Structure and Union

Programming · C Programming · question 83

Q83

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

A.
hello
Answer
B.
Run time error
C.
Nothing
D.
Depends on compiler

Answer: Option A

Solution

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