3 ms·
With 1-based indexing, length == last index. Does 0-based indexing have any advantage, beyond ability to do pointer arithmetic with indexes?
by jballanc 15y ago
With 1-based indexing, length == last index.
Does 0-based indexing have any advantage, beyond ability to do pointer arithmetic with indexes?
- scott_s 15y agoIn 0-based indexing, n % length is a value inside the range.