Vidyalelo
C Programming · Q167

Pointer

Programming · C Programming · question 167

Q167

What will be the output of the following C code? #include int main() int ary[4] = 1, 2, 3, 4; int *p = ary + 3; printf("%d ", p[-2]);

A.
1
B.
2
Answer
C.
Compile time error
D.
Some garbage value

Answer: Option B

Solution

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