+ 9
what is difference between union and structure in c program language.
6 odpowiedzi
+ 22
Biggest difference between structure and union is==>
In structure, all members are stored in different memory location but in union all members are stored in same memory location.
+ 5
With unions, only one of its members can be used at a time and the size of the union is the size of its largest member.
With structs you can use all of its members at any time and because of that, the size of a struct is the size of all its members combined.
+ 2
In structure every variable are stored in separate memory whereas in union one memory hold all variable .the variable having more space is used to store..
+ 1
@piyanka_d_ohol
- That's a good point.