Question
What is the output of the following C code(on a 64 bit machine)? union Sti { int nu; char m; }; int main()
{ union Sti s; printf("%d", sizeof(s)); return 0; }
Answer: Option D
Was this answer helpful ?
Since the size of a union is the size of its maximum datatype, here int is the largest hence 4.
Output:
$ cc pgm7.c
$ a.out
4
Was this answer helpful ?
More Questions on This Topic :
Question 2. %f access specifier is used for? ....
Question 6. Modulus for float could be achieved by? ....
Question 7. %lf is used to display? ....
Submit Solution