Ask Question

What happens when the programmer tries to access an array cell whose index is greater than or equal to its logical size?

+3
Answers (1)
  1. 7 July, 00:32
    0
    When a programmer tries to access an item in an array cell whose index is greater than or equal to the array's logical size, this data element or item is garbage. This means that currently, the item is not the part of the program's useful data. Garbage contains objects or data which will not be used by a program running on it. So the value returned could be either of the two:

    Value would be an arbitrary or random number if it is an array of numbers. Arbitrary means that the value is not predefined or specified in advance. Value returned would be null if it is an array of objects.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “What happens when the programmer tries to access an array cell whose index is greater than or equal to its logical size? ...” 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