怎么把people republic of 和china 用c语言连起来,我想了好半天,求解答
stract,头文件中的函数,用于将两个char类型数组相连,结果放在dest中,并返回拼接后的dest和src。
#include <stdio.h>
#include <stdlib.h>
char *
Strcat(char *arr1, char *arr2)
{
char *tempt = arr1;
while (*arr1 != '\0')
{
arr1++;
}
while (*arr2 != '\0')
{
*arr1 = *arr2;
arr1++;
arr2++;
}
*arr1 = '\0';
return tempt;
}
int main()
{
char a[20] = "hello";
char b[20] = ",everyOne!";
printf("%s", Strcat(a, b));
system("pause");
return 0;
}