/* strlen */ #include #include int strlength(char*); int main() { char mot[100]; int i = 0; printf("Ecrire un mot : "); fgets(mot, 100, stdin); while (mot[i] != '\n') i++; mot[i] = '\0'; printf("Taille de la string : %d\n", strlength(mot)); return 0; } int strlength(char *mot) { int i = 0; while (mot[i] != '\0') { i++; } return i; }