Quantcast
Channel: '\0' evaluates false, "\0" evaluates true - Stack Overflow
Viewing all articles
Browse latest Browse all 10

Answer by msc for '\0' evaluates false, "\0" evaluates true

$
0
0

'\0' is a null character which has the value of 0. It is used to terminate a string of characters. So it's consider false.

"\0" is a null or emptystring. The only character in the string is the null character which terminates the string.So it's consider true.


Viewing all articles
Browse latest Browse all 10

Trending Articles



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