#include<string.h>

main()
{
    char s[50];
    int l;
    printf("enter a string");
    gets(s);

    l=strlen(s);

    printf("The length of the given string =%d",l);
}

     
           
Note: Need to be arranged in compiler after copied
   

 OutPut:

enter a string Hello World The length of the given string =11