#include #include int my_strcmp(); char *my_strcpy(); int main() { char str1[] = "test"; char str2[5]; strcpy(str2, "te"); strcat(str2, "st"); strcpy(str1, "new"); if (my_strcmp(str1, str2) == 0) printf("Strings match! They are of length %d\n", strlen(str1)); else printf("Strings do not match! They are %s and %s\n", str1, str2); } int my_strcmp(char *s, char *t) { for (; (*s != '\0') && (*t != '\0'); s++, t++) if (*s != *t) // strings not equal break; return (int) (*s - *t); } char *my_strcpy(char *s, char *t) { for (; *t != '\0'; s++, t++) *s = *t; return s; }