I have a “char []” output and its size is 256 bytes. I want to check if the string i am about to allocate to the output has more than 256 bytes in it. How can i check this? Does this mean the string cannot contain more than 256 characters??
Share
You can use
strlen()if you want to measure the length of any random string.Nothing in your question would dictate the string cannot contain more than 8 characters.
If you want to provide a little more information, such as where the string is coming from and where it is stored, I may be able to provide additional suggestions.