#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(){
char s1[1024], s2[1024];
char*p, *q;
gets(s1);
gets(s2);
p = s1;
q = s2;
while (*p){
p++;
}
while (*q){
*p++ = *q++;
}
*p = '\0';
puts(s1);
system("pause");
return 0;
}
用指针实现字符串函数strcat()的功能.
最新推荐文章于 2023-05-09 19:58:44 发布