What will be the output of the following C code? [code] #include <stdio.h> int x = 0; void main() { int *ptr =

Nguyễn Pháp

New member
What will be the output of the following C code?
Code:
    #include <stdio.h>
    int x = 0;
    void main()
    {
        int *ptr = &x;
        printf("%p\n", ptr);
        x++;
        printf("%p\n ", ptr);
    }
A. Same address
B. Different address
C. Compile time error
D. Varies
 

Tìm kiếm

Back
Top