quick questions of arrays | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

quick questions of arrays

If i write array[2] and i want to cout the second array , would it be (s+2) or would it be (s+1)? And does it always store the first number in 0?

8th Nov 2017, 10:34 AM
Shirl
Shirl - avatar
2 Answers
+ 5
The index value of an array always starts from 0.
8th Nov 2017, 10:53 AM
Harsh
Harsh - avatar
+ 1
Thank you!
8th Nov 2017, 10:57 AM
Shirl
Shirl - avatar