Similarities between struct and union?

Answer

Struct and Union have following similarities:- Both are aggregated data types that allow a mixed for values to be contained in their instances.They are the way aggregation is done in C for making. The difference between them is that union allows the different items to be in it but allows access to be on one becase they are represented in overlapped manner. A Struct is also aggregation but it separates each data item contained in it and therefore anyone can be accessed anytime from its instance variable.Unions are ordinarily used because of performance and generalization ,while the structures are generally used for aggregation. For queries Rupesh Kumar Joshi ,rupesh_joshi@sify.com

 

Improve Answer Discuss the question "Similarities between struct and union?" Watch Question

First answer by ID996040801. Last edit by ID996040801. Question popularity: 39 [recommend question]


Research your answer:

Can you answer other questions about computers and the net?

Answers.com > Wiki Answers > Categories > Technology > Computers > Similarities between struct and union?

Our contributors said this page should be displayed for the questions below. (Where do these come from)
If any of these are not a genuine rephrasing of the question, please help out and edit these alternates.
Struct in c?  What is struct?  Enum and struct in C?  Difference between struct and union?  What is the difference between enum and define?  What is the difference between struct and union in C?  What is the difference between a struct and union in c?  What are the similarities between union and a structure in c?