#include <stdio.h>

int ft_strcmp(char *s1, char *s2)
{
    int i = 0;
    while (s1[i] != '\0' && s2[i] != '\0' && s1[i] == s2[i])
    {
        i++;
    }
    return s1[i] - s2[i];
}

int main(void)
{
    char str1[] = "HblloA";
    char str2[] = "HblloZ";
    printf("%d\n",ft_strcmp(str1,str2));
    char str3[] = "ablloAa";
    char str4[] = "ablloAb";
    printf("%d",ft_strcmp(str3,str4));
}

Embed on website

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