C strlen():
String Functions are the built-in functions provided by C to operate and manipulate a string. C strlen() function returns the length of a string.
Syntax:
strlen (string name)
Example:
#include<stdio.h> #include <string.h> void main() { char str[10] = "Hello C."; int b; b = strlen (str); printf ("%d\n",b); } |
Output
8 |