Syntax of C strlen()
The syntax of strlen() function in C is as follows:
size_t strlen(const char* str);
Parameters
The strlen() function only takes a single parameter.
- str: It represents the string variable whose length we have to find.
Return Value
- This function returns the integral length of the string passed.
strlen() function in c
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’.
Contact Us