Types of pointer.
Types of pointer in C
Pointers are used to access the variables directly by using their address Locations. The value has been
assigned to the variable gets stored in that particular memory location.
There are Eight different types of pointers,
they are :
- Null pointer
A pointer that is assigned NULL is called a "null pointer".The value of null pointer is 0.
- Void pointer
A void pointer is also called as generic pointer. It doesn't have any standard data type. In this pointer
void keyword is used. It is used to store the address of any variable.
- Wild pointer
Pointers that are not initialized are called wild pointers.
- Dangling pointer
A pointer that points to a memory location that has been deleted is called a dangling pointer.
- complex pointer
Pointer to array
Pointer to array of array
Pointer to array of String
Pointer to array of function
Pointer to function
Pointer to union
Pointer to 2D array
- Near pointer
Near pointer is used to store 16 bit addresses means within current segment on a 16 bit machine.
- Far pointer
Far pointer is a 32-bit pointer, can access information which is outside the computer memory in a given segment.
- Huge pointer
Huge pointer is same as far pointer is a 32-bit pointer, can access information which is outside the computer memory in a given segment.
A huge pointer that is fixed.