Vidyalelo
C Programming · Q117

Pointer

Programming · C Programming · question 117

Q117

What will be the output of the following C code? #include void foo(int*); int main() int i = 10; foo((&i)++); void foo(int *p) printf("%d ", *p);

A.
10
B.
Some garbage value
C.
Compile time error
Answer
D.
Segmentation fault/code crash

Answer: Option C

Solution

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