0% found this document useful (0 votes)
45 views

Assignment 2

The document outlines 8 assignments involving defining C structures to represent different data types and writing programs to work with and analyze the structured data. The assignments include defining structures for students, times, books, circles, employees, dates, complex numbers, and cars, and writing programs to input structured data, perform calculations, and display results.

Uploaded by

Ashish
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

Assignment 2

The document outlines 8 assignments involving defining C structures to represent different data types and writing programs to work with and analyze the structured data. The assignments include defining structures for students, times, books, circles, employees, dates, complex numbers, and cars, and writing programs to input structured data, perform calculations, and display results.

Uploaded by

Ashish
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment : Structures

1. Create a structure called "Student" with members name, age, and total marks. Write a
C program to input data for two students, display their information, and find the
average of total marks.
2. Define a structure named Time with members hours, minutes, and seconds. Write a C
program to input two times, add them, and display the result in proper time format.
3. Create a structure named Book to store book details like title, author, and price. Write
a C program to input details for three books, find the most expensive and the lowest
priced books, and display their information.
4. Define a structure named Circle to represent a circle with a radius. Write a C program
to calculate the area and perimeter of two circles and display the results.
5. Create a structure named "Employee" to store employee details such as employee ID,
name, and salary. Write a program to input data for three employees, find the highest
salary employee, and display their information.
6. Define a structure named "Date" with members day, month, and year. Write a C
program to input two dates and find the difference in days between them.
7. Create a structure named Complex to represent a complex number with real and
imaginary parts. Write a C program to add and multiply two complex numbers.
8. Design a structure named "Car" to store details like car ID, model, and rental rate per
day. Write a C program to input data for three cars, calculate the total rental cost for a
specified number of days, and display the results.

You might also like