The document outlines exercises for creating data structures to store information about employees, books, and students, including their respective attributes. It specifies functions for finding names in specific categories, calculating averages, and displaying details based on unique identifiers. Each exercise emphasizes the need to handle multiple entries for each category using arrays or similar structures.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
3 views2 pages
Exercise1 Struct
The document outlines exercises for creating data structures to store information about employees, books, and students, including their respective attributes. It specifies functions for finding names in specific categories, calculating averages, and displaying details based on unique identifiers. Each exercise emphasizes the need to handle multiple entries for each category using arrays or similar structures.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2
Create a structure to store an employee's ID, name, department, and salary.
• Store information for multiple employees.
• Write functions to: o Find and print the names of employees in a specific department. o Calculate and print the average salary of all employees. o Display the details of an employee given their ID. 1- Exercise Create a structure to store a book's ID, title, author, genre, and price.
• Store information for multiple books.
• Write functions to:
• Find and print the titles of books in a specific genre.
• Calculate and print the average price of all books.
• Display the details of a book given its ID.
2- Exercise • Create a structure to store a student's roll number, name, course, and marks.
• • Store information for multiple students using an array.
• Write functions to:
• Find and print the names of students enrolled in a specific course.
• Calculate and print the average marks of all students.
• Display the details of a student given their roll number.