1.

What Is Void Pointer And What Is Its Use?

Answer»

The void pointer means that it POINTS to a VARIABLE that can be of any type. Other pointers points to a specific type of variable while void pointer is a somewhat generic pointer and can be pointed to any data type, be it standard data type(int, char etc) or user DEFINE data type (STRUCTURE, union etc.). We can pass any KIND of pointer and reference it as a void pointer. But to dereference it, we have to type the void pointer to correct data type.

The void pointer means that it points to a variable that can be of any type. Other pointers points to a specific type of variable while void pointer is a somewhat generic pointer and can be pointed to any data type, be it standard data type(int, char etc) or user define data type (structure, union etc.). We can pass any kind of pointer and reference it as a void pointer. But to dereference it, we have to type the void pointer to correct data type.



Discussion

No Comment Found