- condition: if(a != NULL)same as condition if(a)?
They achieve the same goal. The only real difference in readability.
Their effect is the same, as they will lead to the same.
NULL is a macro that is almost always 0, so:
if(a != NULL)
is equivalent to:
if(a != 0)
which is very similar to:
if(a)
, a true.
, a , . , , NULL (, , 0).