if (p) means if the pointer p is not null. if (*p) means if the object pointed by the pointer is not false (which means the object is not null or zero etc.).