DIGIT-ARC read-only archive · snapshot: July 23, 2026

pointers

11 posts · originally from https://geek.digit.in/community/threads/pointers.98466/

arpanmukherjee1
arpanmukherjee1 Original post #1
Sep 26, 2008 at 12:18 PM
hi there

can sb tell me how to use near and far pointers in c/c++
C
Sep 26, 2008 at 1:02 PM
Standard C really has no such thing. It is an addition done in compilers targeting 8086 CPUs. There really is little need to use it today unless you are using dinosaur C compilers like Turbo C/C++.

Near pointers - Pointers to memory within same segment and thus has only offset.
Far pointers - Pointers to memory within another segment and thus contains both segment selector and offset.
Chetan1991
Oct 6, 2008 at 2:06 PM
Hey chandru do you mean pointers are obslete nowadays??
I have the book "Let us C" 5th ed. and the author seems to emphasise a lot on pointers as if they are very important. So wh did he stressed so much if they are obselete???
QwertyManiac
Oct 6, 2008 at 2:45 PM
He meant the near and far pointer concepts are obsolete now. Pointers are essential, and will never be removed from C/C++.
C
Oct 6, 2008 at 3:00 PM
Exactly. I meant only about the idea of near and far pointers. Pointers themselves will no become obsolete any time soon.
Chetan1991
Oct 11, 2008 at 1:25 PM
what are near and far pointers?? :oops: :?:
C
Oct 11, 2008 at 1:29 PM
^^ See my first reply.
G
Oct 11, 2008 at 1:33 PM
u don't generally use near and far pointers in c++.
dheeraj_kumar
Oct 11, 2008 at 7:32 PM
Near uses 2 bytes, and Far uses 5 bytes, AFAIK.
red_devil
red_devil #10
Oct 11, 2008 at 9:26 PM
^^ i'm not very sure of that !!

btw what kind of programs make use of the near n far ptrs ?? i've never made any use of those stuff

:confused:
L
Oct 17, 2008 at 2:32 PM
^^ i'm not very sure of that !!

btw what kind of programs make use of the near n far ptrs ?? i've never made any use of those stuff

:confused:
now a days we dont use these types of pointers much
they were used earlier
if you want to read more about them
*en.wikipedia.org/wiki/Far_pointer
*en.wikipedia.org/wiki/C_memory_model