C Programming Code Examples C > Strings Code Examples C String function - strlen - It returns the length of the string C String function - strlen - It returns the length of the string size_t represents unsigned short It returns the length of the string without including end character (terminating char '\0'). #include <stdio.h> #include <string.h> int main() { char str1[50] = "Happy Codings - C Programming Language Code Examples"; printf("Length of string str1: %d", strlen(str1)); return 0; }