These are some old concepts used in 16 bit intel architectures in the days of MS DOS, not much useful anymore.
Near pointer is used to store 16 bit addresses means within current segment on a 16 bit machine. The limitation is that we can only access 64kb of data at a time.
A far pointer is typically 32 bit that can access memory outside current segment. To use this, compiler allocates a segment register to store segment address, then another register to store offset within current segment.
Like far pointer, huge pointer is also typically 32 bit and can access outside segment. In case of far pointers, a segment is fixed. In far pointer, the segment part cannot be modified, but in Huge it can be
See below links for more details.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
- Generic Linked List in C
- NULL pointer in C
- Function Pointer in C
- Enumeration (or enum) in C
- Operators in C | Set 2 (Relational and Logical Operators)
- Measure execution time with high precision in C/C++
- Why strcpy and strncpy are not safe to use?
- Applications of Pointers in C/C++
- Communication between two process using signals in C
- Pre-increment and Post-increment in C/C++