#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> void 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; }