Y
Hacker News
new
|
ask
|
show
|
jobs
by
CobrastanJorji
3255 days ago
I assume they mean that C's support for "arrays" is essentially just C's support for pointer arithmetic plus a mapping of a[b] to *(a+b).
2 comments
Kubuxu
3255 days ago
You can even swap it a[b] equivalent to b[a].
link
shitgoose
3255 days ago
shouldn't it be:
* (a + b * sizeof(T))
where T is array elements' type?
link
astrange
3255 days ago
That's implied in + on a pointer. uint32_t* + 1 actually adds 4.
link