Similarities between struct and union?In: Computers |
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
|
|
|
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?
|
|


