Ask Question
8 March, 17:59

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

+2
Answers (1)
  1. 8 March, 20:58
    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?
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