Get address of object in C

Use the address-of operator (&) in front of the variable

e.g.

int x=10; // Store the value x, this will store ‘10’ in memory e.g. at memory location 56 this will store 10.
int *y = &x;// Retrieve the location x is stored and let y point to it, so the value 10 is shared, change it in either and the other will see this change, this will store 56 in memory to refer to x