C Example | Find the Length of a String

This c example code will intoduce how to get the length of a string.

#include <stdio.h>
#include <string.h>
 
int main()
{
    char Str[1000];
    int i;
 
    printf("Enter the String: ");
    scanf("%s", Str);
 
    printf("Length of Str is %ld", strlen(Str));
 
    return 0;
}