Ask Question
28 March, 13: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? It must be large enough to hold all the values, but how many

+5
Answers (1)
  1. 28 March, 14:16
    0
    The size of the array should be decided at run-time. In other words it is better to use dynamic size array.

    Explanation:

    The size of the array will totally depend on the number of items in the list. Since the number of items in the list is not known. Therefore using a fixed size is not a good option.

    A fixed size array can either be too small or too small for the list of values. This can result in lots of memory loss.

    Thus the array size should be decided at run-time by the program.
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