A very important feature of the void pointer is reusability. Using the void pointer we can store the address of any object and whenever required we can get back the object through the indirection operator with proper casting.
Let see an example code,
Output:
Explanation: In the above code, pvData is a void pointer. Using it I am storing the address of the different variables (float, int, and char) and after that getting back their values using the indirection operator and proper typecasting.
You can see in the example code, how a single pointer is dealing with different types of variables. This is a very interesting feature of the void pointer that makes the programmer helpless to use the void pointer.