#include <stdio.h> #include <ctype.h> int strcmp(char* s, char* t) { int i; for(i = 0;s[i]==t[i];i++) { if(s[i]='/0') return 0; } return s[i]-t[i]; } int main() { char* s1 = "aei shan shan"; char* s2 = "du xiao xiao"; int value; value = strcmp(s1,s2); printf("value:%d",value); return 0; }