Why are we using i as a counter in loops?

VariablesLoopsNaming

Variables Problem Overview


Why are we using

for (int i = 0 ; i < count ; i++){ }

Why the i?

Why not

for (int a = 0; a < count; a++){ }

I do it, you do it, everyone does it, but WHY?

*Edit

I found out an old saying about Fortran which is more funny than correct which says "god is real, everything else above is an integer".

"god" would be a variable name stating with a g so it would be in the real domain, while everything else above (excluding h for the joke's purpose) would be an integer.

It seems that the original saying was in fact: "God is real, unless declared integer". Apologies to everyone citing me in their Ph.D thesis.

Variables Solutions


Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionEricView Question on Stackoverflow