asked 121k views
3 votes
Given the declaration, where is the value 97 stored in the numbers array? int numbers[]={83, 62, 77, 97, 88};

1 Answer

3 votes
Let me help you!

Ok, so before I give you the answer, which is very simple, I will first show you how to answer questions like this in the future.

In the variable declaration, the array "numbers[]" has been declared as an integer. The values of the array "numbers[]" are: 83, 62, 77, 97, 88; respectively, the values are equivalent to: 0, 1, 2, 3, 4 which makes the range of array "numbers[]": 5.

To make it clearer:
numbers[0] = 83
numbers[1] = 62
numbers[2] = 77
numbers[3] = 97 <---- This is what we are looking for!
numbers[4] = 88

*** By the way, when counting the range, we don't start at 1, we start at 0. That's why even if the range is 5, the last value is 4.

Therefore, the answer is: 3 or numbers[3].
answered
User Daniel Fekete
by
8.3k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.