Dereferencing Operator

Learn how to get the value pointed out by the pointer.

Indirection/dereferencing operator

Consider the example given in the previous lesson. John's storage house is pointing to Alice's storage house, so John is a pointer here. What if John wanted to know what value is stored in Alice's house?

For this, we will use the dereference operator * before the pointer name to access the value of the variable to which the pointer is pointing.


The dereference operator * is a unary operator. It gives the value of the variable to which the pointer is pointing. This process is known as dereferencing a pointer.

Get hands-on with 1200+ tech skills courses.