Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
astrobe_
on March 4, 2015
|
parent
|
context
|
favorite
| on:
C Questions and Answers
Is it the kind of system for which memset(somestruct, 0, sizeof(somestruct)) doesn't work if the struct has pointers (NULL isn't 0, so null checks will fail if one inits such struct like this)?
EpicEng
on March 4, 2015
|
next
[–]
NULL does not have to be 0 in the sense that it is represented by all 0 bits, it need only compare equal to 0.
Aissen
on March 4, 2015
|
prev
[–]
Not really, NULL is still 0, but the address "0" is valid and readable/writable.
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: