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