Vidyalelo
C Programming · Q80

Pointer

Programming · C Programming · question 80

Q80

What will be the output of the following C code? #include void m(int *p) int i = 0; for(i = 0;i < 5; i++) printf("%d ", p[i]); void main() int a[5] = 6, 5, 3; m(&a);

A.
0 0 0 0 0
B.
6 5 3 0 0
Answer
C.
Run time error
D.
6 5 3 junk junk

Answer: Option B

Solution

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