What is the difference between null pointer and void pointer?

Solution

Null Pointer: Null Pointer is a special value of any pointer type. For example: each pointer type like int *, char * , has its own null-pointer value. If any pointer has null value it means that it is pointing nowhere.

Void Pointer: Void Pointer is a special type of pointer which point to some data/value but that data/value has no type.

For example:

void * data = NULL

Share this thread

Comments

Comments
comments powered by Disqus

Navigation

Social Media