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...

explain about storage of union elements.

Answer Posted / anandi

Union elements can share the common memory spaces.

For eg.

union stu
{
int rno;
int mark;
float total;
};

In this pg, the compiler allocates 4 bytes to store the
union members. Bcoz, in this pg, the float data type only
requires the large memory size, ie, 4 bytes. And the
remaining members can share this 4 bytes. So if u want to
store rno, it will allocate the first 2 bytes.
And also we can store only one value at a time to the
memory.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

where are auto variables stored? What are the characteristics of an auto variable?

1076


What is array in C

1173


What is extern keyword in c?

1137


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1096


What is define directive?

1161


can any one provide me the notes of data structure for ignou cs-62 paper

2180


hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .

2447


int i=10; printf("%d %d %d", i, i=20, i);

1626


How can I implement a delay, or time a users response, with sub-second resolution?

1084


How main function is called in c?

1133


Differentiate between full, complete & perfect binary trees.

1116


Tell me about low level programming languages.

1137


Explain can you assign a different address to an array tag?

1057


When should structures be passed by values or by references?

1050


Explain what is the best way to comment out a section of code that contains comments?

1143