c strcat()函数

strcpy(destination,source)函数将源字符串复制到目标位置。

#include< stdio.h> #include < string.h> int main(){ char ch[20]={'j', 'a', 'v', 'a', '1', '2', '3', '4', '5', '6', '\0'}; char ch2[20]; strcpy(ch2, ch); printf("Value of second string is: %s", ch2); return 0; }

【c strcat()函数】输出:
Value of second string is: srcmini

    推荐阅读