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));

}

a. 4, 4, 4

b. 40, 4, 4

c. 1, 100, 1

d. 40 400 4

Answers were Sorted based on User's Feedback



union u { union u { int i; int j; }a[10]; int ..

Answer / guest

20, 200, error for 3rd printf

Is This Answer Correct ?    3 Yes 2 No

union u { union u { int i; int j; }a[10]; int ..

Answer / psrk

option d

Is This Answer Correct ?    1 Yes 1 No

union u { union u { int i; int j; }a[10]; int ..

Answer / sk

20 200

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Code Interview Questions

#include<stdio.h> main() { register i=5; char j[]= "hello"; printf("%s %d",j,i); }

2 Answers  


What are the files which are automatically opened when a C file is executed?

1 Answers  


write a c program to input initial & final time in the format hh:mm and find the time intervel between them? Ex inputs are initial 06:30 final 00:05 and 23:22 final 22.30

0 Answers  


Link list in reverse order.

8 Answers   NetApp,


Write a procedure to implement highlight as a blinking operation

2 Answers  






void main() { static int i; while(i<=10) (i>2)?i++:i--; printf(ā€œ%dā€, i); }

2 Answers  


main() { char *p; p="Hello"; printf("%c\n",*&*p); }

1 Answers  


what is brs test reply me email me kashifabbas514@gmail.com

0 Answers  


Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like.

21 Answers   ABC, eBay, Goldman Sachs, Google, HUP, Microsoft, TATA,


main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }

1 Answers  


Code for 1>"ascii to string" 2>"string to ascii"

1 Answers   Aricent, Global Logic,


main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } a. 2 b. 100 c. 4 d. none of the above

5 Answers   HCL,


Categories