Question: Write a C + + program that will prompt user to enter an integer for a size of the array of test scores that will
Write a C program that will prompt user to enter an integer for a size of the
array of test scores that will be dynamically allocated at run time. This integer
can be any value from to keep it small as you will need to enter test scores
for this array
The prompt user to enter all values for the test scores. A test score can only be
integer value ranging from to Do not accept any value less then or greater
than You must user pointer notation when access the array.
You may initially write this code in your main function but this code for entering
data to the array must be done in a function. You may call this function
getData Remember that arrays are passed by reference so this function
should have a void return type.
You also need to write another function findAverage that will accept the
array of scores and then calculate and return the average of all scores in the
array. This average value should be type double. Use pointer notation when
accessing the array.
Lastly, write another function called printthat will accept the array and size
of the array and then print each value of the array in one line with each value
separated by a blank character. You may use array notation in this function.
Also print the average with some description from the main function after calling
the print function.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
