C语言字符相加问题

比如输入:我爱,输出:我爱你 直接用+号不行啊怎么办呢

第1个回答  推荐于2016-07-18
:字符串拼接函数 char *strcat(char *destin, char *source);程序例:#include <string.h>
  #include <stdio.h>void main()
  {
  char destination[25];
  char *blank = " ", *c = "C++", *Borland = "Borland";
  strcpy(destination, Borland);
  strcat(destination, blank);
  strcat(destination, c);
  printf("%s\n", destination);
  }本回答被提问者采纳
第2个回答  2013-10-05
连接两人字符串不能用+, 可以通过strcat()函数实现。追问

给个例子吧

第3个回答  2013-10-05
不知道你是什么意思,如果是两个字符串相加的话可参考strcat函数
第4个回答  2013-10-05
你百度strcat吧 能满足你的需求
相似回答