strcat()用法

描述

  • 头文件:
  • char *strcat(char *dest, const char *src)
  • 功能:将src字符串加到dest上,并返回指向dest字符串的指针。

举例

#include
#include 
int main(){
	char str1[20]="hello";
	char str2[]=" world";
	strcat(str1,str2);
	printf("%s",str1);
}

你可能感兴趣的:(c语言基础,c语言)