a. Assume that you have the two-dimensional array program . Create a new C++ pro
ID: 3533624 • Letter: A
Question
a. Assume that you have the two-dimensional array program . Create a new C++ project and add the source code of the
program to it.
b. Add a new function called modify_grades that takes the 2-dimensional array, grades[i][j], and two
indices in order to modify the grade of quiz_j for student_i.
c. Add a function called highest_score_in_quiz which takes the 2-dimensional array, grades[i][j], and
the quiz number and returns the index of the student who got the highest score in that quiz. You need
to test this function in your main program, for example, by outputting both the index of the student
who got the highest score and the score she/he got.
d. Add a new function called highest_score_for_student that takes the 2-dimensional array, grades[i]
[j], and the student number and returns the index of the quiz which she/he got the highest score in
among all the quizzes she/he took. You need to test this function in your main program, for example,
by outputting the student number and the quiz number she/he got the highest score in and the score
itself.
Explanation / Answer
//void modify_grades ( int grades[][num_quizes], int num_students , int num_quizes ); void modify_grades ( int grades[][num_quizes], int num_student , int num_quize, int newGrade ); //int highest_score_in_quiz( const int grades [][num_quizes], int num_students); int highest_score_in_quiz( int grades [][num_quizes], int num_quizes );
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.