C Programming Code Examples C > Strings Code Examples C Program to Find the Length of a String C Program to Find the Length of a String Calculate Length of String without Using strlen() Function You can use standard library function strlen() to find the length of a string but, this program computes the length of a string manually without using strlen() funtion. #include <stdio.h> int main() { char s[888], j; printf("Enter a string: "); scanf("%s", s); for(j = 0; s[j] != '\0'; ++j); printf("Length of string: %d", j); return 0; }