#include <stdio.h>

int	ft_strcmp(char *s1, char *s2)
{
	int	i;

	i = 0;
	while (s1[i] || s2[i])
	{
		if (s1[i] != s2[i])
			return (s1[i] - s2[i]);
		i++;
	}
	return (0);
}

int	main(void)
{
	char	s1[] = "qwerty";
	char	s2[] = "qwerty";

	printf("%d", ft_strcmp(s1, s2));
	return (0);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: