Generic pointer: void pointer in c is known as generic pointer. Literal meaning of generic pointer is a pointer which can point any type of data. Example: void *p;
Wild pointer------------------- A pointer in c which has not been initialized is known as wild pointer.
Near pointer ------------------- The pointer which can points only 64KB data segment is known as near pointer. Size of near pointer is two byte. Near pointer only hold 16 bit offset address. Near pointer cannot access beyond the data segment like graphics video memory, text video memory etc. With help of keyword near, we can make any pointer as near pointer. eg. int near * p;
Dangling pointer----------------- If 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.
Far Pointer --------------- ------------ The pointer which can point or access whole the residence memory of RAM (Generally 1 GB = 64KB * 16 segment ) as far pointer. Size of far pointer is 4 byte or 32 bit. First 16 bit stores: Segment number Next 16 bit stores: Offset address %Fp is used for print offset and segment address of pointer in printf function in hexadecimal number format. eg. int far * p;
Huge Pointer Warning !!!! ----------- If you will increment huge pointer it will increment both offset and segment address unlike to far pointer which only increments offset address. So if you have little knowledge about huge pointer and you are using huge pointer then you can easily access and modify the IVT, device driver memory, video memory etc. This might be dangerous for your computer.

0 comments:
Post a Comment