意思一样,只不过你的程序有点问题,第二个程序中if (s1[i] = '\0') { strcat(ch, &s2[i]); }应该为if (s1[i] = = '\0') { strcat(ch, &s2[i]); }