Question: (a) Write down a structure movieStar that is capable of storing the following information about movie stars of the film industry: (5) Name Age Annual

  1. (a) Write down a structure movieStar that is capable of storing the following information about movie stars of the film industry: (5)
  • Name
  • Age
  • Annual income
  • Gender

(b) Use the movieStar structure to take input of N movie stars information. N will also be input to your program. The gender information must be stored as a character M or F to represent male and female movie stars respectively. (5)

(c) Write down a function that will take an array of movieStar structure and the number of movie stars as parameters and returns the income of the highest annual earning movie star. (5)

(d) Write down a function that will take an array of movieStar structure and the number of movie stars as parameters and returns the age of the youngest movie star in the industry. (5)

  1. (a) Write down a structure capable of storing the following information about a student registered in CSE 115 course: (5)
  • ID
  • Gender
  • Class test score 30%
  • Mid-term score 30%
  • Final score 40%
  • Total score

(b) Use the above structure to take input of N students information as input in an array of structure. N will also be input to your program. (5)

(c) In the same program, write down a function that will take students information (within an array of structure) and the number of the students as parameters and returns how many of them failed. Assume that a student needs to obtain total 60 in order to pass in the exam. (5)

(d) In the same program, write down another function that will take students information (within an array of structure) and the number of students as parameters and returns the ID of the student obtaining the highest marks. (5)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!