C Programming - Pointers - Discussion

Discussion Forum : Pointers - General Questions (Q.No. 4)
How many bytes are occupied by near, far and huge pointers (DOS)?
near=2 far=4 huge=4
near=4 far=8 huge=8
near=2 far=4 huge=8
near=4 far=4 huge=8
Answer: Option
near=2, far=4 and huge=4 pointers exist only under DOS. Under windows and Linux every pointers is 4 bytes long.
41 comments Page 1 of 5.

Abirami said:   3 years ago
1byte = 8 bits.
Near pointer is a 16 bit ie occupies 2 bytes.
Whereas far and huge is a 32-bit pointer i.e. 4 bytes.
So, near =2 far=4 huge=4 bytes.

Srinivas said:   5 years ago
Why near, far keywords are not present in ANSI C?

Dinesh said:   6 years ago
What is huge here?

Gafoor said:   6 years ago
What is near, far, huge? please explain breifly.

Vijay said:   7 years ago
Where is used this types of pointers?

Abhishek said:   7 years ago
A near pointer is a 16-bit pointer to an object contained in the current segment, be it code segment, data segment, stack segment, or extra segment. The compiler can generate code with a near pointer and does not have to concern itself with segment addressing, so using near pointers is fastest, and generates the smallest code. The limitation is that you can only access 64kb of data at a time because that is the size of a segment - 64kb. A near pointer contains only the 16 bit offset of the object within the currently selected segment.

Dipika said:   7 years ago
Nice explanation, thank you all.

YASh said:   7 years ago
How to count byte in this type of example?

Shivu said:   7 years ago
Anyone can please explain the near, far, huge.

Ssekamwa godfrey said:   8 years ago
Still, huge pointer confuses me, explain more, please.

Post your comments here:

Your comments will be displayed after verification.