What is the output of the program, if integer occupies 2 bytes memory?union{int a;char b;char c[10];}u1;void main(){int l=sizeof(u1);printf("%d",l);getch();}A. 13B. 10C. 16D. None of the above


This question is related to Oracle Interview

Showing Answers 1 - 7 of 7 Answers


  • Nov 7th, 2006

D, It must 12 (the maximum is 10 but it had plus 2 (cause bounded memory)).

  Was this answer useful?  Yes

Amarjeet Agrawal

  • Sep 8th, 2015

The right ans is 10 becoz as elements of the union allocates the largest memory.

  Was this answer useful?  Yes

Nisha Sharma

  • Sep 21st, 2015


  Was this answer useful?  Yes


  • Sep 22nd, 2015

B. 10

  Was this answer useful?  Yes

Mani Prakash Singh

  • Oct 17th, 2015


  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