What is a Pointer?
First of all, we revise what is a pointer. A pointer is a variable that stores the memory address of another variable. The pointer helps us to manipulate the data in the memory address that the pointer points. Moreover, multiple pointers can point to the same memory.
Consider the following example,
int num = 10; int *ptr; ptr = #
We have stored the address of the num variable in the ptr pointer, but now, how to access the value stored in the memory at the address pointed by ptr? Here, dereferencing comes into play.
Dereference Pointer in C
We know that the pointer variable can store the memory address in C language and in this article, we will learn how to use that pointer to access the data stored in the memory location pointed by the pointer.