头文件:
#include <string.h>
函数原型:
char *strcat (char *dest,const char *src)
函数描述:
strcat()会将参数src字符串拷贝到参数dest所指的字符串尾,第一个参数dest要有足够的空间来容纳要拷贝的字符串;
返回值:
返回dest字符串参数的起始地址;
例子:
#include <string.h>
#include <stdio.h>
int main(void)
{
char dest[30] = "Hello";
char src[] = "World";
strcat(dest, src);
printf("dest:[%s]n", dest);
return 0;
}
得到的结果是:dest:[HelloWorld]
参考:http://blog.chinaunix.net/uid-26914516-id-4215338.html
最后
以上就是满意小兔子最近收集整理的关于C语言中的strcat()函数的全部内容,更多相关C语言中内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复