Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
The best practice comes to use the right thing in the right situation: 0 for numbers '\0' for characters NULL for pointers false if you are using stdbool.h
2nd Sep 2019, 8:45 PM
Miquel Andreu Fuster Sancho
Miquel Andreu Fuster Sancho - avatar
+ 4
~ swim ~ NULL is (*(void)0) right
2nd Sep 2019, 7:25 PM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 2
I'm not sure but my opinion is that '\0' is the ending element of any character array(string) but the NULL is value that every variables can have. if a variable's value be NULL, it means that the variable has been initialized but hasn't any value; or has the value of 0.
2nd Sep 2019, 7:24 PM
Smohsen Hosainy
Smohsen Hosainy - avatar