|
|
|
|
|
by SAI_Peregrinus
1061 days ago
|
|
I think about it as a difference between indexes and offsets. C uses pointer offsets. Base pointer + offset = destination address. C "array" syntax is sugar for this addition. There are no array indices in C, just pointer offsets. Thus, they start at 0. Some languages have arrays that aren't just a pointer to the first element. In those, indices are a better option. There, starting at 1 usually makes more sense. The first number used should match the use of that number. |
|