Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
zaroth
on Aug 24, 2022
|
parent
|
context
|
favorite
| on:
Why do arrays start at 0?
Simple: Because you add zero to the memory address of an array to access the first element.
The array indexer was syntactic sugar for pointer arithmetic.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
The array indexer was syntactic sugar for pointer arithmetic.