0
0
This commit is contained in:
Guy Baconniere
2021-08-16 09:00:55 +02:00
parent 44692816d5
commit c665b6c546
9 changed files with 164 additions and 0 deletions

View 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);
}

View File

@@ -0,0 +1,8 @@
#!/bin/sh
set -e
#norminette -R CheckForbiddenSourceHeader ft_*.c
norminette -R CheckForbiddenSourceHeader
gcc -Wall -Wextra -Werror -o a.out *.c
echo $(basename $PWD):
./a.out
rm -f a.out