1. Engineering
  2. Computer Science
  3. write a program that dynamically allocates an array large enough...

Question: write a program that dynamically allocates an array large enough...

Question details

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 averages with appropriate headings. Use pointer notation rather than array notation whenever possible.

Input Validation: Do not accept negative numbers for test scores.

GENERAL RESTRICTIONS FOR ALL QUIZZES, MIDTERM AND FINAL EXAM

  1. No global variables
  2. No labels or go-to statements
  3. No infinite loops, examples include:
    1. for(;;)
    2. while(1)
    3. while(true)
    4. do{//code}while(1);
  4. No break statements to exit loops
  5. If you violate any of these restrictions, you will automatically get a score of ZERO!
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution