strlen
Find length of string
Description
The strlen function computes the length of the strings
.
Example:
Example - Find length of string
Workings
#include <stdio.h> #include <string.h> int main() { char s[20] = "abcde1010101"; printf("The length of \"%s\" is %d characters.\n", s, strlen(s)); return 0; }
Solution
Output:
The length of "abcde1010101" is 12 characters.