Showing posts with label shared mem. Show all posts
Showing posts with label shared mem. Show all posts

Monday, March 22, 2010

Struct vs Union




A structure is a collection of items of different types; and each data item will have its own memory location.

An union allocates for each item in a shared memory location i.e., only one memory location will be shared by the data items of union. Size of union will be the size of the biggest variable.





Labels