Assignment 8- Structure
ASSIGNMENT 8: STRUCTURE
- WAP to create a structure named Student that has name, age,marks as members. assume appropriate types of members . use this structure to read and display records of students.
- WAP to create a structure named Student that has name, age,marks as members. assume appropriate types of members . use this structure to read and display records of 5 students.
- WAP to create a structure named date that has day,month and year as its members. Include this structure as a member in another structure named Employee which has name,id and salary as other members . Use this structure to read and display employees name ,id, date of birth and salary.
- WAP to create a structure named BOOK, which has name, pages,and price as its members. Read name,pages and price of book using structure variable.Finally display the record of book using pointer to structure.
- WAP to create a structure named student that has name, roll, marks as its members. assume appropriate types and size members . use this structure to read and display records of 5 students. Create two functions: one is to read the information of students and another function to display student information. Pass an array of structure to above functions as their argument.
- WAP to read the name , rollno and marks of 5 students using an array of structure . Display the name ,roll no of those students whose marks is greater than 50.
- WAP to read the name , address and salary of 5 employees using an array of structures. Display the information of each employee in ascending order of their name.
- Create a structure named book which has members name,pages and price. WAP to read name,no of pages of 5 books using array of structure . Display the name, no of pages and price of most expensive book.(having highest price)
- Create a structure named Employee which has name,address and salary as member . WAP to read the name,address, and salary of 5 employees using an array of structure. Display name of employee, which has third highest salary.
- Create a structure named student which has members: id, name and marks.Read id, name and marks of N students and print the records of students who have passed in distinction.
- WAP to read the name and district of N students from the keyboard using a structure variable and display only those students whose address is ‘Kathmandu” district.
- Represent 3-D coordinate using a structure. WAP using a function that takes two coordinates and returns a third coordinate as their mid-point.
- Create a structure COMPLEX containing real and imaginary as its members. WAP that uses the above structure to input two complex numbers and pass to a function , which returns the sum of entered complex numbers in the main function.
- An Employee record consists of its ID, Name,Age, Salary. Write a menu driven program to perform the following operations:
- Read the records of employees.
- Display the records of all employees
- Display the records of the employees whose salary is greater than 10,000 and age is greater than 25.
- Exiting the program.