void main()
{
char far *farther,*farthest;

printf("%d..%d",sizeof(farther),sizeof(farthest));

}




Answers were Sorted based on User's Feedback



void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof..

Answer / surenda pal singh chouhan

4..2

Explanation:
the second pointer is of char type and not a
far pointer

Is This Answer Correct ?    87 Yes 8 No

void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof..

Answer / 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 ?    60 Yes 4 No

void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof..

Answer / basha

syntax error before '*' token
error: `farther' undeclared (first use in this function)
error: `farthest' undeclared (first use in this function)

I am getting these types of errors how u get 4 and 2 i
didn't understood

Is This Answer Correct ?    15 Yes 29 No



Post New Answer



More C Interview Questions

Write a pro-gramme to determine whether the number is even or odd?

1 Answers  


what is stack , heap ,code segment,and data segment

0 Answers  


What is the difference between pure virtual function and virtual function?

0 Answers  


Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop

0 Answers   HP,


hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

0 Answers   Reliance,






main difference between c and c++ language

1 Answers  


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

0 Answers  


Can a file other than a .h file be included with #include?

0 Answers   Aspire, Infogain,


what is the output for the code : main() { int i,j; printf("%d %d ",scanf("%d%d",&i,&j)); }

20 Answers   Infosys,


what is the use of c program?

4 Answers   Synergy, Web Synergies,


In scanf h is used for

4 Answers   BFL,


a=0; b=(a=0)?2:3; a) What will be the value of b? why b) If in 1st stmt a=0 is replaced by -1, b=? c) If in second stmt a=0 is replaced by -1, b=?

6 Answers   Geometric Software,






Categories