+ 1
Isn't "int a[5];" supposed to hold six values instead of 5?
Array lesson question
3 Respuestas
+ 3
no no
a[5] means it holds 5 values
0,1,2,3,4 are the address of the values
i also got confused on that, so i thought i may clear your doubt too
+ 1
5 is the length of the array (how many elements). Can't forget to include the 0'th index towards how many elements there are!
0
oh yeah. thanks for clearing that one up