Ask Question
9 November, 11:52

Suppose you want to write a program that will read a list of numbers from a user, place them into an array and then compute their average. How large should you make the array?

+4
Answers (1)
  1. 9 November, 15:31
    0
    The size of the array is dependent on the amount of memory the program can access.

    Explanation:

    Here according to the question the user is in need of memory space equal to the amount of numbers read from the list. So the size of the array should be equal to the total numbers read from the list. if the user reads 5 number from the list then the size of the array should be int a[5] if the numbers are integers. Wastage of memory space is not appreciated in a good piece of code.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Suppose you want to write a program that will read a list of numbers from a user, place them into an array and then compute their average. ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers