6

NULL and '/0' are two different things. NULL is a null pointer. '/0' is a null byte. C handles those two differently enough to introduce some interesting issues. Helped a friend debug his code, execvp() was freaking out because he had tried to terminate his argv array with a null byte instead of a null pointer. As far as the system was concerned, that doesn't mean anything more than "oh look there's no string here." Big big difference.

Comments
Add Comment