data structures using programming tip it is an error to use structureunion variable as member of its own struct type structure or union type unionrespectively declaring union the syntax for declaring union is the same as that of declaring structure the only difference is that instead of using the keyword structthe keyword union would be used the syntax for union declaration can be given as union union-name data_type var-namedata_type var-name}programming tip variable of structure or union can be declared at the time of structure/union definition by placing the variable name after the closing brace and before the semicolon again the typedef keyword can be used to simplify the declaration of union variables the most important thing to remember about union is that the size of union is the size of its largest field this is because sufficient number of bytes must be reserved to store the largest sized field accessing member of union member of union can be accessed using the same syntax as that of structure to access the fields of unionuse the dot operator ) the union variable name followed by the dot operator followed by the member name initializing unions the difference between structure and union is that in case of unionthe fields share the same memory spaceso new data replaces any existing data look at the following code and observe the difference between structure and union when their fields are to be initialized #include typedef struct point int xy}typedef union point int xint }int main(point { , }/point ={ , }illegal in case of unions point printf("\ the coordinates of are % and % " xp )printf("\ the coordinates of are % and % " xp )return output the coordinates of are and