It means the first element of the array is at index 0.
Traditional mathematical notation is that the first element in an array is element #1, and that's the way we refer to them as well ("first" element, not "zeroth" element).
However, many programming languages, including C and its derivative languages (C++, C#, Java) use zero-based arrays. For example:
int array[] = new int[] { 40, 356, 102 };
System.out.println("" + array[1]);
... would print "356", since the 0-index element in the array is the first one, and the element at index 1 is the SECOND element in the array.
2007-08-04 05:52:01
·
answer #1
·
answered by McFate 7
·
2⤊
0⤋
Zero Based Index
2016-10-14 10:05:21
·
answer #2
·
answered by Anonymous
·
0⤊
0⤋
This Site Might Help You.
RE:
What is a zero based array in programming?
2015-08-07 18:10:38
·
answer #3
·
answered by Coleen 1
·
0⤊
1⤋
An array is a structure which holds elements.
To access an element, you specify the index of the element.
In A Zero based array, the first element has a zero index, the second a 1 index and so on.
Hope this helps
2007-08-04 07:18:52
·
answer #4
·
answered by Smutty 6
·
1⤊
0⤋
For the best answers, search on this site https://shorturl.im/avtNj
for( int i = 0; i < myArray.length; i++) That's the workhorse of programming. An empty array is [null] and so we have to have 1 less than the length(). That, and my instructor used to yell out to the class "Because godd**n programmers don't know how to count!"
2016-04-09 06:08:36
·
answer #5
·
answered by Anonymous
·
0⤊
0⤋