What is a far pointer in C?

A pointer which can access all the 16 segments (whole residence memory) of RAM is known as far pointer. A far pointer is a 32-bit pointer that obtains information outside the memory in a given section.

In C, a far pointer is a pointer that can address a larger memory space than a near pointer. In systems where memory is segmented, such as older x86 architectures, memory addresses are composed of a segment part and an offset part. A near pointer only contains the offset part, limiting its ability to address memory within a single segment. However, a far pointer contains both the segment and offset parts, allowing it to address memory across different segments, thus providing access to a larger memory space.

In modern computing environments, such as 32-bit or 64-bit systems, where memory segmentation is not prevalent, the concept of far pointers is not commonly used. However, in legacy or specialized systems, such as real mode in x86 architecture or certain embedded systems, far pointers might still be relevant.