Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
WalterBright
on April 14, 2020
|
parent
|
context
|
favorite
| on:
Tell HN: C Experts Panel – Ask us anything about C
> they are accessed using pointer arithmetic
Not always. Consider:
int a[3]; a[1] = 2;
This is not using pointer arithmetic. Dump the generated code if you don't believe me :-)
quelsolaar
on April 14, 2020
|
next
[–]
Its still pointer arithmetic, its just done compile time rather then at execution. Still, you deserve style points :-)
saagarjha
on April 15, 2020
|
prev
[–]
Tell that to
mov DWORD PTR [rsp - 8], 2
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
Not always. Consider:
This is not using pointer arithmetic. Dump the generated code if you don't believe me :-)