What will be the output of the following C code? [code] #include <stdio.h> int main() { int ary[4] = {1, 2, 3, 4};

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

Tìm kiếm

Back
Top