#include<stdio.h>
union abc
{
char a;
int b;
int c;
}z;
int main()
{
printf(“size of union %d\n”,sizeof(union abc));//the size of the union is the maximum size of the data type.
z.a=4;
printf(“the value for a is %d\n”,z.a);
z.b=5;
printf(“***********************after assign the value again**********************\n”);
printf(“the value for b is %d\n”,z.b);//as their is only 1 block of memory is allocated so the previous value will be overwrite.
printf(“the value for a is %d\n”,z.a);
return 0;
}