Explaination...

#include<stdio.h>
#include<conio.h>
void main()
{
char far *s1,*s2;
printf("%d %d",sizeof(s1),sizeof(s2));
getch();
}

OUTPUT = 4 2
----> Hello, This program gives output like above mentioned. How please explain me and also explain about far pointer.
There's no such thing as a "far pointer" in modern C (let alone C++). It is a relict from old days and nothing you need to concern yourself with. If you get that output, you have to update your compiler.

If you're interested for whatever reason, see here: http://en.wikipedia.org/wiki/Far_pointer or here:
http://en.wikipedia.org/wiki/Intel_Memory_Model#Pointer_sizes
Holy-
That's one ancient compiler, you got there. I'd suggest using one that is not from the early Neolithic.
http://www.cplusplus.com/forum/articles/7263/
Topic archived. No new replies allowed.