Dereferencing pointers in C and C++
int x = 4;
int *p = &
*p; // results in the value 4
The asterisk dereferences the pointer; the value of the expression is the value of the variable whose memory address to which the identifier points.
Related Learn more about pointers in C and C++ Learn how to get the address of a variable |