Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Explain what is the heap?

1102


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.

2151


What is the difference between malloc calloc and realloc in c?

1190


Write a program to reverse a linked list in c.

1180


Write a C program to count the number of email on text

1966


How to compare array with pointer in c?

1168


Write a simple code fragment that will check if a number is positive or negative.

1209


Lists the benefits of c programming language?

1205


When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?

1116


Which is best linux os?

1081


Can 'this' pointer by used in the constructor?

1133


How does sizeof know array size?

1171


What are compound statements?

1243


How does selection sort work in c?

1099


What is the use of in c?

1085