Array indexes are well suited to serve as values of loop control variables.
Array sizes are well suited to serve as boundary conditions:
const int SIZE = 10; int v[SIZE]; for (int i = 0; i < SIZE; i++) { ... process the element v[i] ... } |
It's good practice to give constant names to array sizes.