31st Dec 2017, 6:16 PM
Sebastian
Sebastian - avatar
2 Answers
+ 13
Valid indices for an array of size 2 are: 0 and 1. Use i<2 as loop condition instead of i>=2.
31st Dec 2017, 6:23 PM
Shamima Yasmin
Shamima Yasmin - avatar
+ 2
Thanks!
31st Dec 2017, 6:24 PM
Sebastian
Sebastian - avatar