Array elements are zero-indexed in C/C++ and most programming languages. Element myarray[4] is actually the fifth element because myarray[0] is the first, myarray[1] is the second, and so on. This zero-based indexing is a common source of off-by-one errors for beginners.