This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
You may be right when you say it is copied from C/C++ (which may have copied ASM 68000). In these languages, tab[i] refers to a memory adress situated at tab+i*sizeof(tab elements). So it is easier to refer to 0 as being the first element, otherwise it would have needed one more arithmetic operation: tab+(i-1)*sizeof(tab elements). Any other ideas? W.
Yeah, Wilfred is spot on. The reasons for array initialisation at 0 are very low level memory address type stuff, and indeed, low level logic dictates starting at 0, so there is an (uneccessary??) overhead in manipulating this default value for the purposes of our code.
Its not what you do, its the way you say you've done it.