Question: Lab Test 2 (Chapter 7 - 10) Question: Write a program that dynamically allocates an array large enough to hold a user-defined number of test

 Lab Test 2 (Chapter 7 - 10) Question: Write a program
that dynamically allocates an array large enough to hold a user-defined number
of test scores. Once all the scores are entered, the array should

Lab Test 2 (Chapter 7 - 10) Question: Write a program that dynamically allocates an array large enough to hold a user-defined number of test scores. Once all the scores are entered, the array should be passed to a function that sorts them in ascending order. Another function should be called that calculates the average score. The program should display the sorted list of scores and average with appropriate headings. Use pointer notation rather than array notation whenever possible. Expected output are the below. How many test scores will you enter? -2 The number cannot be negative. Enter another number: 3 Enter test score 1: 90 Enter test score 2: -80 Negative scores are not allowed. Enter another score for this test: 80 Enter test score 3: 70 The test scores in ascending order, and their average are: Score 70.00 80.00 90.00 Hverage score: 80.00 Press any key to continue .i include > nunTestScores: 10/100 1/ 1. Validate the input. 2. Allocate an array to hold the test scores. (dynamic memory allocation test ScorePtr- 1/ Fill the array with test scores. for (int i = 0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here is the full solution to your problem following all the instructions given The code is written in C uses dynamic memory allocation input validatio... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!