int ft_strlen(char *str)
{
int i;
i = 0;
while (*str != '\0')
{
i++;
str++;
}
return (i);
}
#include <stdio.h>
int main() {
char tableau[] = "Je peux pas j'ai piscine!";
int longueur;
longueur = ft_strlen(tableau);
printf("La longueur de la chaîne \"%s\" est %d.\n", tableau, longueur);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: