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

Why string is used in c?

957


1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.

2754


What is difference between array and structure in c?

1095


What does the function toupper() do?

1068


What is function prototype?

1059


Is stack a keyword in c?

1041


What are linked lists in c?

1088


Suggesting that there can be 62 seconds in a minute?

997


What are multibyte characters?

1063


What’s the special use of UNIONS?

1111


Are negative numbers true in c?

1003


What is #define size in c?

1122


What are register variables in c?

979


What does double pointer mean in c?

1081


Can 'this' pointer by used in the constructor?

1047