Vidyalelo
C Programming · Q185

Structure and Union

Programming · C Programming · question 185

Q185

What will be the output of the following C code? #include struct temp int a; s; void func(struct temp s) s.a = 10; printf("%d ", s.a); main() func(s); printf("%d ", s.a);

A.
10 (Garbage Value)
B.
0 10
C.
10 0
Answer
D.
(Garbage Value) 10

Answer: Option C

Solution

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