> if (ptr) is perfectly okay > if (ptr != NULL) is also okay and may be better style NULL is #defined in <stdio.h> and other places as 0. Do not confuse NULL (or its macro expansion, 0) with a null pointer. NULL is an integer constant (after macro expansion). Are you confused yet?