头文件:#include <string.h>
strcat() 函数用来连接字符串,其原型为:char *strcat(char *dest, const char *src);【参数】dest 为目的字符串指针,src 为源字符串指针。strcat() 会将参数 src 字符串复制到参数 dest 所指的字符串尾部;dest 最后的结束字符 NULL 会被覆盖掉,并在连接后的字符串的尾部再增加一个 NULL。注意:dest 与 src 所指的内存空间不能重叠,且 dest 要有足够的空间来容纳要复制的字符串。【返回值】返回dest 字符串起始地址。【实例】连接字符串并输出。----------------------------------------------------------#include <stdio.h>#include <string.h>int main (void){ char str[80];strcpy (str,"here ");strcat (str,"is ");strcat (str,"the ");strcat (str,"xiaoz ");puts (str);return 0;}-----------------------------------------------------------输出结果:here is the xiaoz其他的语言字符串处理的函数都有很多,c语言的字符串处理很麻烦。(PS:留个记号,后面备用)