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

Ngô Quốc Huy

New member
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\n", p[-2]);
    }
A. 1
B. 2
C. Compile time error
D. Some garbage value
 

Tìm kiếm

Back
Top