vishalgarg837@gmail.com
Basically I know that
Difference between Structure and Union
Basically I know that struct
uses all the memory of its member and union
uses the largest members memory space.
With a union, you're only supposed to use one of the elements,
because they're all stored at the same spot. This makes it useful when
you want to store something that could be one of several types. A
struct, on the other hand, has a separate memory location for each of
its elements and they all can be used at once.
|
No comments:
Post a Comment