Quantcast
Viewing all articles
Browse latest Browse all 10

Answer by G.Mather for '\0' evaluates false, "\0" evaluates true

'\0' is a char that is equal to number zero. "\0" is a string and we usually add '\0' at the end of a string. Don't use '\0' or "\0" in a conditional statements because it's quite confusing.

The following usage is suggested:

if (array[0] != 0){}if (p != 0){}if (p != NULL){}

Viewing all articles
Browse latest Browse all 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>