CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS LANGUAGES C DETAILS
Question :
union u
{
union u
{
int i;
int j;
}a[10];
int b[10];
}u;
main()
{
printf("n%d", sizeof(u));
printf(" %d", sizeof(u.a));
// printf("%d", sizeof(u.a[4].i));
}



Category C Interview Questions
Rating (0.0) By 0 users
Added on 7/18/2006
Views 653
Rate it!
Answers:

it depends on implementation.sizeof(int)= 4 rather than 2 so this might be:40 40 4 which also is A)None of Above.





If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
union u
{
struct st
{
int i : 4;
int j : 4;
int k : 4;
int l;
}st;
int i;
}u;
main()
{
u.i = 100;
printf("%d, %d, %d",u.i, u.st.i, u.st.l);
}

View Answer
#define SQR(x) x * x
main()
{
printf("%d", 225/SQR(15));
}


View Answer
main()
{
int i = 0xff ;
printf("n%d", i<<2);
}


View Answer
main()
{
int i;
float *pf;
pf = (float *)&i;
*pf = 100.00;
printf("n %d", i);
}


View Answer
main(int argc, char *argv[])
{
(main && argc) ? main(argc-1, NULL) : return 0;
}


View Answer
main()
{
int i;
clrscr();
printf("%d", &i)+1;
scanf("%d", i)-1;
}



View Answer
What is use of macro arguments in c?
what is major difference between normal macro definition and macro arguments.

View Answer
Write a code for implementation of doubly linked list with use of single pointer in each node

View Answer
Why don't we add null pointer at the end of array of integer?How can we calculate the length of array of integer?

View Answer
How argc and argv works in the following main function?


main(int argc,char *argv[])
{ int n,i=0;
while(argv[1][i]!='\0')
{ n=fun(); i++;}
printf(




View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL C Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/5985/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

0.94