|
Illustration of pointer assignments
Int* x;
int* y;
int i;
int j;
Memory map at this moment is as:

x=&i; // the statement assigns the pointee i to pointer x or we can say address of i is stored in variable x.

*x=2; // the pointee of x gets the value 2. This statement is equivalent to i=2;
Memory map at this moment is as:

|