Examveda
Examveda

What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int ary[4] = {1, 2, 3, 4};
    int *p = ary + 3;
    printf("%d\n", p[-2]);
}

A. 1

B. 2

C. Compile time error

D. Some garbage value

Answer: Option B


This Question Belongs to C Program >> Pointer

Join The Discussion

Related Questions on Pointer