PROGRAMING
Union mean container of various type of data. We can store string array integer float type data in union. For declare a union type must be use union reserve word.
union empDetails
{
int emp_id;
char emp_name[50];
char birth_date[20];
}
union empDetails emp1;
Main differrence between union and structure is. During program execution or declaring time union hold only one largest amount data from union. Suppose we declare two data from union
Finally we will found emp1.name variable.
Read what excites, achieves and moves us Read what excites, achieves and moves us