Ask Question
11 July, 06:56

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?

+2
Answers (1)
  1. 11 July, 07:45
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers