0
It boggles me that "&p" isn't the same as "&var"
int var = 50; int *p; p = &var;. Basically, the data stored in pointer p is var's memory location, although the memory location of p is some other coordinates.
2 odpowiedzi
+ 4
Here's visualization of your example:
https://code.sololearn.com/cI3lheys34IY/?ref=app
+ 3
Does it become easier if you just regard an adress as a data type?
int x; // can store an int
int *x; // can store an address to an int