0
Why is the maximum index position of an array example:(NAME[6]) is 5 even when the initial index position is 0?
3 Réponses
+ 7
because you start counting from 0-1-2-3-4-5 its 6 numbers
0
0 =1, 1=2 and so forth.
0
arr[size] Here size represents total number of elements an arr can hold.
Ex. size = 4
arr can hold 4 element, those 4 elements are indexed from 0-3, 0,1,2,3
And thats how it works