What is the difference between return NULL
and return 0
in C?
Yes, I know that 0
is a number and NULL
is a void. But I don't understand the purpose of the two in context of programming.
Also I believe return 0
doesn't return the number 0
to calling function, but returns void
. So what difference would it make if the statements return NULL
and return 0
are interchanged?