Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

why does array index start from 0

An array arr[i] is interpreted as *(arr+i). Here, arr denotes the address of the first array element or the 0 index element. So *(arr+i) means the element at i distance from the first element of the array. So array index starts from 0 as initially i is 0 which means the first element of the array.
Source by albertkoz.com #
 
PREVIOUS NEXT
Tagged: #array #index #start
ADD COMMENT
Topic
Name
7+6 =