void main()
{
char far *farther,*farthest;
printf("%d..%d",sizeof(farther),sizeof(farthest));
}
Answer Posted / jaroosh
Some explanation first:
far pointers are outdated concepts from C, and are actually
compiler extentions, so you might get compiler errors trying
to use far pointers on some compilers.
In the program above,
farther's type - FAR pointer to char
farthest's type - near pointer to char
now, the difference in size of those stems from the fact
that far pointers consist of the segment and offset
together, while near pointers just have the offset.
Near pointers thus have size of 2 (just the offset), while
far pointers - size of 4 bytes.
Is This Answer Correct ? | 64 Yes | 4 No |
Post New Answer View All Answers
Explain how can you tell whether a program was compiled using c versus c++?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
How can I make sure that my program is the only one accessing a file?
How do you define a string?
How many parameters should a function have?
string reverse using recursion
What are c header files?
What is difference between && and & in c?
What is a null string in c?
What does 1f stand for?
Is c a great language, or what?
Write a program to swap two numbers without using third variable in c?
What is the symbol indicated the c-preprocessor?
What is variable declaration and definition in c?
Is linux written in c?