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

What will be the output of the following C code?
Code:
    #include <stdio.h>
    int main()
    {
        int x = 3; //, y = 2;
        const int *p = &x;
        *p++;
        printf("%d\n", *p);
    }
A. Increment of read-only location compile error
B. 4
C. Some garbage value
D. Undefined behaviour
 

Tìm kiếm

Back
Top