Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why is there so much confusion surrounding null pointers?

0
Posted

Why is there so much confusion surrounding null pointers?

0

5.15: I’m confused. I just can’t understand all this null pointer stuff. 5.

0

The fact that null pointers are represented both in source code, and internally to most machines, as zero invites unwarranted assumptions. The use of a preprocessor macro (NULL) may seem to suggest that the value could change some day, or on some weird machine. 5.15: I’m confused. I just can’t understand all this null pointer stuff. A: A simple rule is, “Always use `0′ or `NULL’ for null pointers, and always cast them when they are used as arguments in function calls.” 5.

0

The fact that null pointers are represented both in source code, and internally to most machines, as zero invites unwarranted assumptions. The use of a preprocessor macro (NULL) may seem to suggest that the value could change some day, or on some weird machine.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.