Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question #2: Write a function named analyzeGradeList that is given a two-dimensional array containing the passing grades from students which contains ' P ' for
Question \#2: Write a function named "analyzeGradeList" that is given a two-dimensional array containing the passing grades from students which contains ' P ' for passing and ' N ' for not-passing Each student will have exactly 2 classes (chars). The function will return two set of values: - the number of students who have 1 pass and 1 no-pass. - the total counts of ' P ' grades only for each separate class. Note: The function can handle any number of students (array size) but each student must have exact 2 classes only. Please consider passing the array of 2 integers to pass back the counts for each grade. Examples of testing data: char gradeList1 [][2]={{P,P,N}}; char gradelist2[][2] ={{P ', 'P'\} }; char gradeList3[ [2]={{N,N}}; char gradelist4 ][2]={{,,P}, char gradeList5[ [2]={{P,P,P}, { \{ P,S,N}, {P,P}, {N ', 'N'\} }; Here are the corresponding returned values in the same order: One Pass Count: 1 Passing Count for class \#1: 1 Passing Count for class \#2: 0 One Pass Count: 0 Passing Count for class \#1: 1 Passing Count for class \#2: 1 One Pass Count: 0 Passing Count for class \#1: 0 Passing Count for class \#2: 0 One Pass Count: 1 Passing Count for class \#1: 0 Passing Count for class \#2: 1 One Pass Count: 1 Passing Count for class \#1: 3 Passing Count for class \#2: 2 One Pass Count: 3 Passing Count for class \#1:4 Passing Count for class \#2: 1
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