union
{
char ch[10];
short s;
}test;
test.s = 0xabcd;
main()
{
printf("%d",ch[10]);
}
Answer Posted / maruthi
Answer:it will print the value of test.s because union
allocates memory for the largest sized variable.And 'll get
the value of recently stored variable.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Write program to remove duplicate in an array?
printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions
Explain how do you convert strings to numbers in c?
What is data structure in c language?
Explain the difference between exit() and _exit() function?
List a few unconditional control statement in c.
Write a program to print numbers from 1 to 100 without using loop in c?
What are structure members?
What is volatile keyword in c?
Explain how do you declare an array that will hold more than 64kb of data?
Is exit(status) truly equivalent to returning the same status from main?
Why is c fast?
What is pivot in c?
Is r written in c?
I heard that you have to include stdio.h before calling printf. Why?