Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a new program but the requirements are modification from question # 1 above. Hence, you will need to do all tasks mentioned above but
Create a new program but the requirements are modification from question #
above. Hence, you will need to do all tasks mentioned above but add the following.
You may input an integer of size here just to minimize data entry.
In addition to creating array for scores, also dynamically create an array to store
names of all students.
Your function to read the data keep the same function name getData but
this time you will need to pass the array for the scores, the array for the names
and the size of array. You may use pointer or array notation.
No change for the function to calculate the average.
Add a function to sort the array of scores from lowest to highest. Use any sort
algorithm you are comfortable with. This sort function will accept the array of
scores, the array of name and array size. You will sort using the array of scores
but whenever you move anything in the array of scores, you must also move
corresponding value in the array of names.
You can use pointer or array notation.
Lastly, your print function will be modified to also accept the array for
names. Hence, you will need to print the name and score of each student. You may
use array or pointer notation.
Then print average for the test lastly as in question #
Test program to make this is working. followed with the
source code for question # and then screenshot of output.
Remember to check that your outputs are correct.
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