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

When you call malloc() to allocate memory for a local pointer, do you have to explicitly free() it?

2 Answers   Aloha Technology,


What is meant by keywords in c?

0 Answers  


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

0 Answers   L&T,


Write a program which has the following seven functions. The functions should be: • main() this calls the other 6 functions • fget_long() a function which returns a long data type from a file • fget_short() a function which returns a short integer variable from a file • fget_float() a function which returns a floating point variable from a file • fprt_long() a function which prints its single, long argument into a file • fprt_short() a function which prints its single, short argument into a file • fprt_float() a function which prints its single, floating point argument into a file. You should use fscanf() to get the values of the variables from the input (the file) and fprintf() to print the values to the other file. Pay attention to using the correct format for each of the data types.

0 Answers  


what is the difference between definition and declaration? give me some examples.

2 Answers   TCS,






Can we increase size of array in c?

0 Answers  


Does * p ++ increment p or what it points to?

0 Answers  


What is #include cctype?

0 Answers  


1. Write a C program to count the number of occurrence of a specific word in the given strings. (for e.g. Find how many times the word “live” comes in the sentence “Dream as if you’ll live forever, live as if you’ll die today ”)

12 Answers   Eskom, TCS,


we all know about the function overloading concept used in C++ and we all learnt abt that.... but that concept is already came in C in a very smaller propotion ... my question is IN WHICH CONCEPT THERE IS A USE OF FUNCTION OVERLOADING IS USED in C language?????????????

4 Answers   Google,


Which header file is used for clrscr?

0 Answers  


write a program to display reverse of a number using for loop?

14 Answers  


Categories