#define _CRT_SECURE_NO_WARNINGS #includevoid link(char *s,char *t) { while (*s != '\0') { s++; } while (*t != '\0') { *s++ = *t++; } *s = '\0'; } int main() { char p[128] = "123"; char *q = "456"; link(p, q); printf("連接後的p:%s", p); system("pasue"); getchar(); return 0; }