#include <stdio.h>
#include <string.h>
int main() {
    char str[20];
    int i=0;
    printf("enter any string\n");
    scanf("%s",str);
    while(str[1]!='\0')
    {
        i++;
    }
    printf("the input string is %s\n",str);
    printf("length of string is %d\n",i);
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: