Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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