C语言教程
C语言控制语句
C语言函数
C语言数组
C语言指针
C语言字符串
C语言数学函数
C语言结构
C语言文件处理
C预处理器

C语言strcat()函数

strcat(first_string,second_string)函数连接两个字符串,结果返回给first_string。
#include<stdio.h>
#include <string.h>  
int main(){  
  char ch[10]={'h', 'e', 'l', 'l', 'o', '\0'};  
   char ch2[10]={'c', '\0'};  
   strcat(ch,ch2);  
   printf("Value of first string is: %s",ch);  
 return 0;  
}  
输出:
Value of first string is: helloc
昵称: 邮箱:
Copyright © 2022 立地货 All Rights Reserved.
备案号:京ICP备14037608号-4