Structures and Unions:

Q1: Create a structure called Student with the following attributes: name, roll number, and marks in three subjects. Write a program that takes input for five students, stores their information in an array of structures, and then displays the name and average marks of each student.

Q2: Create a structure called Employee with attributes for employee name, employee ID, and salary. Write a program to input details of 10 employees and display the employee with the highest salary.

Q3: Create a structure called Time with attributes for hours, minutes, and seconds. Write a program that takes input for time in seconds and converts it into hours, minutes, and seconds, then displays the result.

Q4: Create a structure called Book with attributes for title, author, and price. Write a program that allows the user to input details for a collection of books, stores them in an array of structures, and then displays the details of books with a price greater than a specified value.

Q5: Create a union called Temperature with attributes for Celsius and Fahrenheit temperatures. Write a program that takes input for a temperature value in either Celsius or Fahrenheit, and store it in the union. Convert and display the temperature in both Celsius and Fahrenheit.

Q6: Create a structure called Student with attributes for name, roll number, and a union called Result that contains attributes for marks in mathematics and science. Write a program to input details of five students and display the name, roll number, and marks in either mathematics or science, depending on user input.

Q7: Create a structure called Complex with attributes for real and imaginary parts of a complex number. Write a program to perform addition and subtraction operations on two complex numbers entered by the user.

Q8: Create a union called Shape that represents different geometric shapes, such as circle, square, and triangle. Each shape should have attributes for its parameters (e.g., radius, side length, base, height). Write a program to calculate and display the area of the selected shape.