Friday, August 19, 2011


                    A union is a variable that declares a set of multiple variables (called members or elements having different data types) sharing the same memory area.

The union is declared in the similar way to that of structures expects that the keyword union is used instead of struct.

The general syntax used for declaration of union is as:
        union union-tag
          data-type-1 member-1;
          data-type-2 member-2;
          data-type-N member-N;
        } v1, v2, …,vn;

Previous Next Home

Leave a Comment

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Twitter Delicious Facebook Favorites More