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 ?    94 Yes 11 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 ?    64 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 30 No

Post New Answer

More C Interview Questions

Write a program to find given number is even or odd without using any control statement.

2 Answers  


Why doesn't C support function overloading?

2 Answers  


Where static variables are stored in memory in c?

0 Answers  


What is c programming structure?

0 Answers  


what is the difference between NULL('\0') and 0?

14 Answers   Microsoft,






What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

0 Answers  


what do you mean by inline function in C?

0 Answers   IBS, TCS,


how to construct a simulator keeping the logical boolean gates in c

0 Answers  


void main() { int i=5; printf("%d",i++ + ++i); }

21 Answers   ME,


Describe the modifier in c?

0 Answers  


What is static memory allocation? Explain

0 Answers  


Explain the bubble sort algorithm.

0 Answers  


Categories