Correct Answer - Option 2 : Void pointer
Void pointer: It is a specific pointer type – void * – a pointer that points to some data location in storage, which doesn’t have any specific type. Void refers to the type.
- void pointers cannot be dereferenced. It can however be done using typecasting the void pointer
-
Pointer arithmetic is not possible on pointers of void due to lack of concrete value and thus size
Other Important Points
Dangling pointer: A pointer pointing to a memory location that has been deleted (or freed) is called dangling pointer.
Uninitialized pointer : An uninitialized pointer stores an undefined value. A null pointer stores a defined value, but one that is defined by the environment to not be a valid address for any member or object.
NULL Pointer : NULL Pointer is a pointer which is pointing to nothing. In case, if we don’t have address to be assigned to a pointer