#include int my_strcmp(); main() { char s[1000], t[1000]; int i; printf("Input 2 strings:"); gets(s); printf("Another string:"); gets(t); i=my_strcmp(s,t); if(i) printf("They are different at the %dth char.\n", i); else printf("They are identical.\n"); } int my_strcmp(char *s, char *t) { int i, j=0; for(i=0;;i++) if(s[i]==0 || t[i]==0) break; else if(s[i]!=t[i]) { j=++i; break; } return(j); }