+ 1

what is the different between stucts nd union

18th Jul 2016, 6:44 AM
Vijoy Techy
Vijoy Techy - avatar
6 Réponses
+ 1
Members of structure can be accessed individually.. where in union only one at a time structure members do not share their memory.where union members shares.
18th Jul 2016, 4:40 PM
Swara Gadre
Swara Gadre - avatar
+ 1
also the size of the structure is sum of each member size. n in union it equivalent to the member having largest value
18th Jul 2016, 4:41 PM
Swara Gadre
Swara Gadre - avatar
0
do u mean struct?
18th Jul 2016, 4:33 PM
Swara Gadre
Swara Gadre - avatar
0
ya
18th Jul 2016, 4:34 PM
Vijoy Techy
Vijoy Techy - avatar
0
Thank you #Swara Gadre#
18th Jul 2016, 4:46 PM
Vijoy Techy
Vijoy Techy - avatar
0
Structs are like boxes which can store several objects whereas unions are boxes which are big enough to store any of the items the are defined for but they can only store an item at once
5th Nov 2016, 3:02 PM
JAGM
JAGM - avatar