函数题:mystrcat
编写一个函数 char* mystrcat(char *s1, const char *s2)
函数功能是把字符串s2的所有元素连接到字符串s1之后。
### 函数接口定义:
c++
在这里描述函数接口。例如:
char* mystrcat(char *s1, const char *s2)
### 裁判测试程序样例:
c++
在这里给出函数被调用进行测试的例子。例如:
#include <stdio.h>
char* mystrcat(char *s1, const char *s2);
int main(void)
{
char str1[100] = "Winter ", str2[60] = "is ", str3[30] = "comming.";
mystrcat(str1, mystrcat(str2, str3));
printf("%s", str1);
return 0;
}
/* 请在这里填写答案 */
### 输入样例:
在这里给出一组输入。例如:
in
无输入
### 输出样例:
在这里给出相应的输出。例如:
out
Winter is comming.
答案:若无答案欢迎评论
函数功能是把字符串s2的所有元素连接到字符串s1之后。
### 函数接口定义:
c++
在这里描述函数接口。例如:
char* mystrcat(char *s1, const char *s2)
### 裁判测试程序样例:
c++
在这里给出函数被调用进行测试的例子。例如:
#include <stdio.h>
char* mystrcat(char *s1, const char *s2);
int main(void)
{
char str1[100] = "Winter ", str2[60] = "is ", str3[30] = "comming.";
mystrcat(str1, mystrcat(str2, str3));
printf("%s", str1);
return 0;
}
/* 请在这里填写答案 */
### 输入样例:
在这里给出一组输入。例如:
in
无输入
### 输出样例:
在这里给出相应的输出。例如:
out
Winter is comming.
答案:若无答案欢迎评论