Doubt regarding code

if there is a string s=“sagar”
then what value will strlen(s) give?

hello @HyperX
strlen function return length of string .
here in this case it will return 5

in this code, we have \0 as well, so why is it not counted in strlen?

strlen is implemented like that only.
it count only those characters that r before \0.

oh okay,thankyou !..

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.