Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

how the compiler treats any volatile variable?Explain with example.

1 Answers   Tata Elxsi,


Differentiate between calloc and malloc.

0 Answers   Wipro,


how to print 2-D array using a single for loop?

2 Answers   Mind Tree, TCS, Value Labs,


Which of the following is not a valid declaration for main ()? 1) int main() 2) int main(int argc, char *argv[]) 3) They both work

2 Answers  


Without using main fn and semicolon,print remainder for a given number in C language

2 Answers  


Do you have any idea how to compare array with pointer in c?

0 Answers  


how to implement stack operation using singly linked list

2 Answers  


Explain how does flowchart help in writing a program?

0 Answers  


Write a program for deleting duplicate elements in an array

3 Answers   Subex,


write a program to print calender using for loop.

1 Answers   HCL, TCS,


Can we add pointers together?

0 Answers  


What are comments and how do you insert it in a C program?

0 Answers  


Categories