i as a variable of choice for traversing arrays

i, typically lower case, is typically used to traverse arrays in most of the computer programming languages in use today. Most notably C. And because of syntactical and learning curve relations, also C++, and Java.

Although various other variable names like - 'index'. 'counter', 'count' etc. are also invariably used, but even in projects with most well followed coding guidelines (which normally forbid defining any variable with name containing less than three characters), programmers feel comfortable only when using 'i' as an array subscript.

For multidimensional arrays or for two array traversals, 'j', 'k' 'l' etc. are commonly used.

This, it should be noted, is not without a reason.

The reasons for such uses are historical and date back to the times when FORTRAN was the language of a real programmer.

In FORTRAN, (specially the original one) one never needed to declare any variables, any variable with name starting with alphabets between (and including) 'I' and 'N' were integers by default. Similar alphabetical limits were defined for floats etc.

Thus, a programmer requiring an integer would typically start from 'I' and go on.

As most of initial C language programmers were proficient in Fortran, they naturally started by using 'i', 'j', 'k' etc. as the variables of choice for traversing the arrays.