![]() |
VOOZH | about |
The strlen() function in C calculates the length of a given string. The strlen() function is defined in string.h header file. It doesn't count the null character '\0'.
The syntax of strlen() function in C is as follows:
size_t strlen(const char* str);
The strlen() function only takes a single parameter.
The below programs illustrate the strlen() function in C:
Length of string is : 13
The following points should be kept in mind while using strlen():