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

Write program to remove duplicate in an array?

1026


printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions

1096


Explain how do you convert strings to numbers in c?

1022


What is data structure in c language?

1056


Explain the difference between exit() and _exit() function?

1109


List a few unconditional control statement in c.

929


Write a program to print numbers from 1 to 100 without using loop in c?

1027


What are structure members?

1027


What is volatile keyword in c?

998


Explain how do you declare an array that will hold more than 64kb of data?

1398


Is exit(status) truly equivalent to returning the same status from main?

1008


Why is c fast?

1009


What is pivot in c?

974


Is r written in c?

1110


I heard that you have to include stdio.h before calling printf. Why?

1007