I have declared a string array String s;
I tried finding the length of the string by giving strlen(s) but it didnt work . How to get the length of the string ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The function strlen does not take a string, but an array of chars. Please see this reference for examples. If you are using the type string you will find it’s length by using the function length(), like this:
For more examples see this other question.