Calloc () and NULL
2 answers
No, they are not always equivalent, but on the most popular machines everything will be fine. calloc
writes a bit pattern of all zeros to the allocated memory, but the null pointer value may not be completely bit-zero on some machines (or even for some types on some machines).
Check out the Null Pointers section in the C FAQ for a lot of information.
+3
source to share