#include <stdio.h>
int mystrcmp(const char *str1, const char *str2);
int main(void)
{
char str1[] = "gay";
char str2[] = "gayda";
if(mystrcmp(str1, str2)) {
printf("The strings are the same.");
}
else printf("The strings aren't the same.");
return 0;
}
int mystrcmp(const char *str1, const char *str2)
{
char *p1, *p2;
unsigned temp = 0;
p1 = str1;
p2 = str2;
while(1) {
if(*p1!=*p2) return 0;
else if(*p1=='\0' || *p2=='\0') return 1;
*p1++;
*p2++;
}
}