#Does the length of a string include the null terminator?
19 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
6, when you don't specify the length of the array and you use a string literal to initialize it, it includes the null terminator
wait it's 7, you tricked me lol
cheese is 6 letters
plus 1 for null terminator
oops
what if I did
[6]
would it not include the null terminator
or would it just error or
then it wouldn't include the null terminator because it doesn't fit into the array
Thank you and let us know if you have any more questions!
np
!solved
Message is already solved