Hacker News new | past | comments | ask | show | jobs | submit login

> The reasoning is: the code as written makes no sense; therefore it's incomplete. Obviously, then, it's not intended to be read literally, and is just an abbreviated portion of the real code. The first line just declares p as a pointer. The second line dereferences the pointer. The pointer assignment has been elided for brevity and is not relevant to this question.

No. The pointer assignment has been elided to see if anyone clues in that the pointer is, in fact, uninitialized.

The correct answer is "the pointer is uninitialized. Writing to it will result in undefined behavior, possibly even a SEGV."




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: