Jan 24, 2012

NULL vs. 0

 char * p = 0; /* IS WRONG! DAMMIT! */
 int i = NULL; /* THIS IS WRONG TOO! */
and anybody who writes code like the above either needs to get out of the kernel, or needs to get transported to the 21st century.

NULL is a pointer, while 0 can never be.

LOL :-)
Post a Comment