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
Explain what is the heap?
Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.
What is the difference between malloc calloc and realloc in c?
Write a program to reverse a linked list in c.
Write a C program to count the number of email on text
How to compare array with pointer in c?
Write a simple code fragment that will check if a number is positive or negative.
Lists the benefits of c programming language?
When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?
Which is best linux os?
Can 'this' pointer by used in the constructor?
How does sizeof know array size?
What are compound statements?
How does selection sort work in c?
What is the use of in c?