#include<stdio.h>

#include<string.h>

int main()

{

 char destination[25];

 char  *zhang="zhang ",*er=" er",*xiong=" xiong";

 strcpy(destination,zhang);//这相当于初始化

 strcat(destination,er);

 strcat(destination,xiong);



 printf("%s\n",destination);

 

 return 0;

}

c语言,strcat(),字符串拼接的更多相关文章

  1. C语言实现字符串拼接

    #include <stdio.h>#include <stdlib.h>#include <string.h> char* str_contact(const c ...

  2. C语言strcat()函数:字符串连接(拼接)

    C语言strcat()函数:字符串连接(拼接)   C语言 strcat() 函数用来将两个字符串连接(拼接)起来. 头文件:string.h 语法/原型: char*strcat(char* str ...

  3. C语言学习笔记之字符串拼接的2种方法——strcat、sprintf

    本文为原创文章,转载请标明出处 1. 使用strcat进行字符串拼接 #include <stdio.h> #include <stdlib.h> #include <s ...

  4. 嵌入式-C语言基础:字符串拼接函数strcat

    #include<stdio.h> #include <string.h> //实现字符串拼接 char * mystrcat(char * dest,char * src) ...

  5. 字符串拼接 strcat ;数组和指针的区别

    问题:字符串拼接 strcat 方法1: 开辟新空间,存放结果: #include <stdio.h> #include <stdlib.h> #include <str ...

  6. 【C语言学习笔记】字符串拼接的3种方法 .

    昨天晚上和@buptpatriot讨论函数返回指针(malloc生成的)的问题,提到字符串拼接,做个总结. #include<stdio.h> #include<stdlib.h&g ...

  7. C语言字符串拼接

    1.使用strcat进行字符串拼接 #include <stdio.h> #include <stdlib.h> #include <string.h> int m ...

  8. C语言常用字符串函数总结

    ANSI C中有20多个用于处理字符串的函数: 注意:const 形参使用了const限定符,表示该函数不会改变传入的字符串.因为源字符串是不能更改的. strlen函数: 函数原型:unsigned ...

  9. Objective的字符串拼接 似乎没有Swift方便,但也可以制做一些较为方便的写法

    NSString *str1 = @"字符串1"; NSString *str2 = @"字符串2"; //在同样条件下,Objective的字符串拼接 往往只 ...

  10. C语言之字符串处理函数

    C语言中字符串处理函数介绍 下面介绍8种基本的常用的字符串处理函数,在数值数组中也常常用到(部分函数).所有的C语言编译系统中一般都提供这些函数. 1.puts函数——输出字符串的函数 一般的形式为p ...

随机推荐

  1. windows 下 使用codeblocks 实现C语言对python的扩展

    本人比较懒就粘一下别人的配置方案了 从这开始到代码 摘自http://blog.csdn.net/yueguanghaidao/article/details/11538433 一直对Python扩展 ...

  2. c#执行Dos命令

    一个执行Dos命令的窗口程序,与各位分享.   效果图:     具体实现在代码中有详细的注释,请看代码.   实现执行CMD命令的核心代码(Cmd.cs):   [csharp]   using S ...

  3. VM8下安装Mac OS X 10.7

    下载Mac OS X  10.7 安装包http://115.com/file/clj1iu8m#            下载HJMac http://115.com/file/cljyu1rh#   ...

  4. values of type NSInteger should not be used as format arguments; 关于Xcode中烦人的32位与64位警告处理方法.

    http://stackoverflow.com/questions/16075559/why-does-an-nsinteger-variable-have-to-be-casted-to-long ...

  5. "is not on any development teams " Xcode的账号错误问题

    "***@*** is not on any development teams " Xcode现在在"Accounts"中时不时会出现这个提示. 但其他按钮都 ...

  6. ArcSDE 10.1安装、配置、连接 (SQL Server 2008)

    转自:http://blog.csdn.net/esrichinacd/article/details/8510224 1  概述 ArcSDE 10.1的安装配置相较于ArcSDE 10.0和之前版 ...

  7. NGINX(二)内存池

    ngxin中为了加快内存分配的速度,引入了内存池, 大块申请, 减少分配次数, 小块分割, 极大的提高了内存申请速度, 另外一个用途就是省去了很多内存管理的任务,因为这里没有提供内存释放的功能,也就是 ...

  8. HTTP分段下载

    现代WEB服务器都支持大文件分段下载,加快下载速度,判断WEB服务器是否支持分段下载通过返回头是否有 Accept-Ranges: bytes 字段.分段下载分为两种,一种就是一次请求一个分段,一种就 ...

  9. POJ --- 3613 (K步最短路+矩阵快速幂+floyd)

    Cow Relays   Description For their physical fitness program, N (2 ≤ N ≤ 1,000,000) cows have decided ...

  10. 【转】Installing OpenCV on Debian Linux

    In this post I will describe the process of installing OpenCV(both versions 2.4.2 and 2.4.3) on Debi ...