Indirection operator *

The * (indirection) operator determines the value referred to by the pointer-type operand. The operand can be a pointer to an incomplete type that is not cv void. The lvalue thus obtained cannot be converted to a C++11prvalueC++11 rvalue. If the operand points to an object, the operation yields an lvalue referring to that object. If the operand points to a function, the result is C onlya function designatorC only C++ onlyan lvalue referring to the object to which the operand pointsC++ only. Arrays and functions are converted to pointers.

The type of the operand determines the type of the result. For example, if the operand is a pointer to an int, the result has type int.

Do not apply the indirection operator to any pointer that contains an address that is not valid, such as NULL. The result is not defined.

If p_to_y is defined as a pointer to an int and y as an int, the expressions:
p_to_y = &y;
*p_to_y = 3;
cause the variable y to receive the value 3.