Quantcast
Channel: User Peter - Reinstate Monica - Stack Overflow
Viewing all articles
Browse latest Browse all 223

Comment by Peter - Reinstate Monica on C strlen on char array

$
0
0
@JonathanLeffler What may not be obvious to C beginners is that string literals like "Hello" have an implicit extra character appended, the zero byte, even though it is not explicitly written. That is, "" has an array length (and a sizeof result) of 1, the zero byte, even though it seems empty and the strlen result is 0.

Viewing all articles
Browse latest Browse all 223

Trending Articles



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