Contact Us || Privacy Policy || About Us |
|
Pointer Type DeclarationThere are different types of Pointer that is...
1) NULL PointerNULL pointer is a pointer which is pointing to nothing. NULL pointer points the base address of segment. OR When NULL Pointer is used, you do not have any address assigned to the pointer. A null pointer always contains value 0. Example:-2) Dangling pointerIf any pointer is pointing the memory address of any variable but after some variable has deleted from that memory location while pointer is still pointing such memory location. Such pointer is known as dangling pointer and this problem is known as dangling pointer problem. 3) Generic pointerVoid pointer is known as generic pointer.Generic pointer is a pointer which can point type of data. It does not have any standard data type. A void pointer is created by using the keyword void. It can be used to store an address of any variable. Example 1:-Example 2:-Output The size of pointer is:4 4) Wild pointerA pointer in c which has not been initialized is known as wild pointer. Example 2:-Output timeout: the monitored command dumped core sh: line 1: 95298 Segmentation fault timeout 10s main 5) Complex pointer
6) Near pointerThe pointer which can points only 64KB data segment or segment number 8 is known as near pointer. 7) Far pointerThe pointer which can point or access whole the residence memory of RAM i.e. which can access all 16 segments is known as far pointer. 8) Huge pointerThe pointer which can point or access whole the residence memory of RAM i.e. which can access all the 16 segments is known as huge pointer. |