Assignment 8- Structure

ASSIGNMENT 8: STRUCTURE 

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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)
  9. 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.
  10. 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.
  11. 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.
  12. Represent 3-D coordinate using a structure. WAP using a function that takes two coordinates and returns a third coordinate as their mid-point.
  13. 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. 
  14. An Employee record consists of its ID, Name,Age, Salary. Write a menu driven program to perform the following operations:
  1. Read the records of employees.
  2. Display the records of all employees
  3. Display the records of the employees whose salary is greater than 10,000 and age is greater than 25.
  4. Exiting the program.