Vidyalelo
C Programming · Q50

Structure and Union

Programming · C Programming · question 50

Q50

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

A.
hello
B.
Segmentation fault
Answer
C.
Run time error
D.
Nothing

Answer: Option B

Solution

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