@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.