Compare
int Same(char *s1, char *s2)
{
    char *c1, *c2;
    c1 = s1;
    c2 = s2;
    while (*c1 != '\0' && *c2 != '\0' && *c1 == *c2) {
        c1++;
        c2++;
    }
    if (*c1 == '\0' && *c2 == '\0')
        return 1;
    else
        return 0;
}

Note:
same with strcmp, excepts return value is inversed.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License