C Programming – Assignment 9
Structure and Union
*WAP – Write a Program
1. WAP using structure to find the largest of three numbers.
2. WAP using structure to read and display the student information (name, roll no, dob,
marks of two subjects). Print the size of structure using sizeof operator.
3. Define structure to store the value of two distances. One distance must be defined using
kms and another distance using meters. Write user defined function to read, display, add,
and subtract two distances.
4. WAP to define a union and structure both having exactly the same members. Using the
sizeof operator, print the size of structure variable as well as union variable.
5. Modify the second program to store the information of 5 students.