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
How arrays can be passed to a user defined function
any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()
What is the difference between int main and void main?
When the macros gets expanded?
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
What is a ternary operator in c?
what are the facialities provided by you after the selection of the student.
c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above
Write a program to use switch statement.
about c language
When should the register modifier be used? Does it really help?
How we can insert comments in a c program?
What is a MAC Address?
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
How is a macro different from a function?