编写一个函数void strlink(char *s, char *t) 将字符串t连接到字符串s的尾部 */
#include <stdio.h>
#include <string.h>
void strlink(char *s, char *t);
int main()
{
char *s = "ilove";
char *t = "jishuang";
strlink(s, t);
return 0;
}
void strlink(char *w, char *a)
{
int m = strlen(w);
int j =0;
while ((w[m++] = a[j++]));
printf("%s\n",w);
}
|