Structure and Union in C program

Structure and Union in C

Here you will get the a program code of structure and union in C programming.

Difference between Structure and Union

Structure and Union are both user-defined data types in C programming. The main difference between structure and unions in c is following:-

Structure Union
A structure is a grouping of one or more variables with a same name that may be of multiple types. A union is similar to a structure, but instead of containing multiple variables, all of them share the same memory location.

Structure and Union in C program

Output

Enter employee id and Name :
101 raju

Enter mode of contact :
Enter 1 for mobile no.
2 for email
1

Enter Mobile number:9313654789
101 raju 9313654789

 

 

Check out our other C programming Examples

 

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top