Check out example codes for "c++ first index 0 or 1". It will help you in understanding the concepts better.

Code Example 1

Arrays are indexed starting at 0, as opposed to starting at 1. The first element of the array above is vector[0]. The index to the last value in the array is the array size minus one.

Learn ReactJs, React Native from akashmittal.com