Getting the address of a variable in C and C++

        int x;
&x; // gets the address of x
The identifier must be a variable; the & prefix causes the statement to evaluate to the memory address of the identifier, so long as the identifier is a primitive type.


Learn more about pointers in the pointers tutorial

Learn how to dereference a pointer