0
an output showing the value of a pointer contained a digit x. Why is it so?
Pointer store memory address in hexadecimal An exercise in this app output showing the value of a pointer contained a digit x. Please explain...
1 Answer
+ 6
I assume that the pointer was dereferenced.
for example:
int* x;
int y = 89;
x = &y;
printf("%p", x);
This would give you the address of y, but if you were to do:
int* x;
int y = 89;
x = &y;
printf("%d", *x);
You should get 89.