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

what are the advantages & disadvantages of unions?

Answer Posted / vishnu nayak

Union occupy same memory area for different members in a
union.
Same are is allocated for different data types of the
members of union
eg:
union
{
int a;
char c;
float f;
}temp;
Size of Float will be size of union.
same memory is used for char and int as well.
Advantages: Memory consumption is less.
Disadvanteges: if one of the member variable is updated the
it will be reflected in the remaining 2 variables.

Is This Answer Correct ?    62 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does 1f stand for?

1083


Why shouldn’t I start variable names with underscores?

1002


What is meant by operator precedence?

1095


What is main return c?

932


Why does everyone say not to use scanf? What should I use instead?

1362


What are identifiers and keywords in c?

1030


Describe the difference between = and == symbols in c programming?

1291


Who invented bcpl language?

1115


What is a substring in c?

993


What is pre-emptive data structure and explain it with example?

3652


What are the disadvantages of external storage class?

1003


Can you write the algorithm for Queue?

2023


What is function in c with example?

1085


What are the different categories of functions in c?

1077


What are the two types of functions in c?

937