#include <stdio.h>
int countLength(char arr[]);
int main() {
    char name[100]; // only firstName
    fgets(name, 100, stdin);
    puts(name);
    printf("Length is : %d", countLength(name));
    
    return 0;
}
int countLength(char arr[]){
    int count = 0;
    for (int i = 0; arr[i] != '\0' ; i++ ) {
        count++;
    }
    return count;
}

Embed on website

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