commit
This commit is contained in:
32
C_04/git_old/ex00/main.c
Normal file
32
C_04/git_old/ex00/main.c
Normal file
@@ -0,0 +1,32 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* 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);
|
||||
}
|
||||
Reference in New Issue
Block a user