Getting the address stored in a pointer in C or C++

        int *p = new int;
p; // gets the address of the memory allocated above
A pointer by default returns the memory address of the variable to which it points. Related

Learn more about pointers