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
What is mean by data types in c?
code for find determinent of amatrix
What is static and volatile in c?
What is the use of function in c?
Explain what is #line used for?
Why main is used in c?
Explain the difference between #include "..." And #include <...> In c?
What is a stream in c programming?
How do I copy files?
write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays
What are the advantages of using new operator as compared to the function malloc ()?
Are c and c++ the same?
What is const volatile variable in c?
Write a program in c to replace any vowel in a string with z?
Is array name a pointer?