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 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
Step by Step Solution
There are 3 Steps involved in it
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
Get step-by-step solutions from verified subject matter experts
