Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ryao
4 months ago
|
parent
|
context
|
favorite
| on:
Debugging memory corruption: who the hell writes "...
Pointers are numbers representing memory addresses. This is very obvious if you look at the definition of NULL in C. It is:
#define NULL ((void *)0)
As of C99, C also has uintptr_t, which lets you treat pointers as integers.
moomin
4 months ago
[–]
I mean, that’s horribly misleading. There’s no guarantee that “zero” is actually an int zero. (Although I’m pretty sure it is on Intel and ARM.)
Consider applying for YC's Summer 2025 batch! Applications are open till May 13
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: