Ask 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. How large should you make the array? It must be large enough to hold all the values, but how many

+4
Answers (1)
  1. 18 November, 18:40
    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 & 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