TCS
Company
Programming
Definition
what is difference between void pointer and null pointer?
Read Solution (Total 7)
-
- a null pointer points to nothing and a void pointer can point to anything.It can point to int or float or any data type.
- 10 years agoHelpfull: Yes(9) No(0)
- void pointer is pointer that can store the address of any variable (float,int, pointer varaible).
But Null pointer is pointer that is used to denote the end of memory search and it doesnot point to any object or function or method. - 10 years agoHelpfull: Yes(4) No(0)
- void pointer - pointer is declared and defined its content as zero
null pointer - pointer is declared and not defined - 10 years agoHelpfull: Yes(2) No(0)
Null pointer is a special reserved value of a pointer. A pointer of any type has such a reserved value. Formally, each specific pointer type (int *, char * etc.) has its own dedicated null-pointer value. Conceptually, when a pointer has that null value it is not pointing anywhere.
Void pointer is a specific pointer type - void * - a pointer that points to some data location in storage, which doesn't have any specific type.
So, once again, null pointer is a value, while void pointer is a type.- 9 years agoHelpfull: Yes(1) No(0)
- null pointer-null pointer points to nothing but initially its points to the base address of the segment of the memory.We cannot copy anythinf in the null pointer.
void pointer-void pointer is also called as universal pointer, it can be made to point to anything. - 10 years agoHelpfull: Yes(0) No(0)
Null pointer is a special reserved value of a pointer. A pointer of any type has such a reserved value. Formally, each specific pointer type (int *, char * etc.) has its own dedicated null-pointer value. Conceptually, when a pointer has that null value it is not pointing anywhere.
Void pointer is a specific pointer type - void * - a pointer that points to some data location in storage, which doesn't have any specific type.
- 9 years agoHelpfull: Yes(0) No(0)
- void pointer is return the null value but null pointer is not assign the any value means the varible value in empty
- 7 years agoHelpfull: Yes(0) No(0)
TCS Other Question