Input length of the string

When we cin a string an then print its length then for example:

string: Hello

stlen(string)=5 or 6 as we also calculate the \0 character which will be included at the time of execution.

pls correct me if i am wrong in this concept

@jsn853 it will be 5

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

1 Like