What would be the output of the following program? main() { char near * near *ptr1; char near * far *ptr2; char near * huge *ptr3; printf("%d %d %d",sizeof(ptr1),sizeof(ptr2),sizeof(ptr3)); } a) 1 1 1 b) 1 2 4 c) 2 4 4 d) 4 4 4

This question is related to Sonata Interview

Showing Answers 1 - 8 of 8 Answers

Tanuja

  • Oct 25th, 2005
 

c) 2 4 4

  Was this answer useful?  Yes

basher

  • Jan 12th, 2006
 

hey cum on guys.. which one is ryt....

  Was this answer useful?  Yes

Vamsee Krishna

  • Jan 24th, 2006
 

2  4  4 is the correct one

  Was this answer useful?  Yes

Krupa

  • May 25th, 2006
 

2 4 4 is the correct.. I have checked it on turbo c/c++

  Was this answer useful?  Yes

Sudheshna.p

  • Jul 7th, 2006
 

no doubt the answer is 2 4 4

  Was this answer useful?  Yes

ankit verma

  • Nov 3rd, 2015
 

2 4 4 in Turbo C (16 bit)
4 8 8 in GCC Compiler (32 bit)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions