33 lines
1.2 KiB
C
33 lines
1.2 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: gbaconni <marvin@42lausanne.ch> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2021/08/13 09:02:59 by gbaconni #+# #+# */
|
|
/* Updated: 2021/08/13 09:03:17 by gbaconni ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
int ft_strlen(char *str);
|
|
|
|
int main(void)
|
|
{
|
|
char str[32];
|
|
int result;
|
|
|
|
printf("Input String [max 31]: ");
|
|
scanf("%s", str);
|
|
result = ft_strlen(str);
|
|
printf("str=%s result=%d (ft_strlen)\n", str, result);
|
|
result = strlen(str);
|
|
printf("str=%s result=%d (strlen)\n", str, result);
|
|
return (0);
|
|
}
|