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
- (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)
- (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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started