differentiate between structure and union in c,differentiate between structure and union with suitable example,difference between structure and union in c++,difference between structure and union in c ppt,difference between structure and union in tabular form,difference between structure and union in c programming with example,difference between structure and union in c pdf,difference between structure and union in c language,
Differentiate between structure and union.
Structure
|
Union
|
1. It allocates memory equal
to sum of memory allocated to its each individual member.
|
1.It allocates piece of
memory that is Large enough to hold the Largest variable of type in union.
|
2.each member have their
own memory space.
|
2. one block is used by all
the members of union.
|
3. structure can not
be implemented in shred memory.
|
3. Union is the Best
environment where memory is shared.
|
4. it has less Ambiguity.
|
4. as memory is shared,
Ambiguity is more in union.
|
5. Self referential
structure can be implemented in data structure.
|
5. self ref. union can not
be implemented.
|
6. All members if structure
can be accessed at a time.
|
6. only one member is
accessed at a time.
|
differentiate between structure and union in c,differentiate between structure and union with suitable example,difference between structure and union in c++,difference between structure and union in c ppt,difference between structure and union in tabular form,difference between structure and union in c programming with example,difference between structure and union in c pdf,difference between structure and union in c language,