Ask Question
21 February, 21:24

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?

+3
Answers (1)
  1. 21 February, 22:38
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers