Question: Part B) Write code for the function double findMajorAvg (Student students [1, char major , int istudentCnt) Which is passed an array of students, the

Part B) Write code for the function double findMajorAvg (Student students [1, char major , int istudentCnt) Which is passed an array of students, the total count of the students, and a string for major. The findMajorAvg ) function shall return the average GPA for students based on the last input. For example: Student students[]= { Bananon") {"abc123", , ("abc456", "EE", 12, 3.41, "Cloud Strife" , ("abc789", "CS", 40, 2.60, "Tifa Lockhart" , f"efg123", "CS", 48, 3.55, "Optimus Prime"; "CS", 33, 3.35, "Bananin For this data, findMajorAvg(students, "CS", 4) would return 3.17 (the average of Bananin, Tifa, and Optimus only)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
