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

What is the code in while loop that returns the output of given code?

1991


what is the syallabus of computer science students in group- 1?

2319


Why doesnt that code work?

1176


What is variable initialization and why is it important?

1257


Explain how can I read and write comma-delimited text?

1161


What is the difference between the expression “++a” and “a++”?

1234


Why is c called c?

1020


What is the difference between int main and void main?

1048


Write a program of prime number using recursion.

1089


What is void pointers in c?

1006


Define circular linked list.

1031


write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?

2132


How do you use a 'Local Block'?

1171


What is printf () in c?

1091


hi any body pls give me company name interview conduct "c" language only

2282