DEV Community

Discussion on: Why array indexing in C++ starts from 0, not 1

Collapse
 
pentacular profile image
pentacular

sizeof (int) need not be 2 or 4, just >= 1.

Other than that, the insight here is that zero is the additive identity, just as one is the multiplicative identity, which makes these good choices for origins, as they require no compensation. :)