piscine-timo-moulinette/c03/ex01/ft_strncmp_test.c

18 lines
332 B
C

#include <stdio.h>
#define STR1 "a"
#define STR2 "a"
#define LENGTH 0
int main(void)
{
int result;
printf("'%s' VS '%s' length %d\n", STR1, STR2, LENGTH);
result = ft_strncmp(STR1, STR2, LENGTH);
if(!result)
printf("Strings are the same (0)\n");
else
printf("Strings are different (offset=%d)\n", result);
return (0);
}