字符串函数strcat
来源:互联网 发布:unity3d动画状态转移 编辑:程序博客网 时间:2024/05/16 17:50
strcat函数作用是连接两个字符数组中的字符串,把字符串2接到字符串1的后面,结果放在字符数组1中,函数调用后得到一个函数值——字符数组1的地址。
这是我自己编写的my_strcat:
#include <stdio.h>char *mystrcat(char *str1,char *str2){ char *p = str1; while(*str1) str1++; while(*str2) { *str1++ = *str2++; } *str1 = '\0'; return p;}int main(){ char str1[30]; char str2[20]; printf("Please input str1:"); gets(str1); printf("Please input str2:"); gets(str2); printf("The new string:%s\n",mystrcat(str1,str2)); return 0;}
0 0
- 字符串函数strcat
- strcat();字符串拼接函数
- 连接字符串strcat()函数
- 字符串函数strcat
- strcat字符串拼接函数
- ORACLE 字符串聚合函数 strCat
- ORACLE 字符串聚合函数 strcat
- LoadRunner字符串拼接函数strcat
- LoadRunner字符串拼接函数strcat
- strcat函数——字符串连接函数
- 字符串基本处理函数(strlen,strcpy,strcat)
- 连接两个字符串不用strcat函数
- 字符串基本处理函数(strlen,strcpy,strcat)
- 字符串处理函数strcat和strtok
- C语言strcat()函数:连接字符串
- 两个字符串连接,不用strcat函数
- 自写字符串连接函数strcat
- 自己实现字符串连接函数strcat
- 侧滑菜单(Fragment)
- mysql的左连接、右连接和内连接
- C语言笔试题总结
- leetcode 198: House Robber
- Java学习提要——Scanner基础应用
- 字符串函数strcat
- 内存映射文件(MMAP)
- 不借助第三个变量,交换两个变量值的3种方式
- **View Angle
- 网站分析(五)
- python微信机器人
- BZOJ 2456: mode 题解 好小的空间
- 顺序线性表的基本知识总结
- Bitmap和Drawable的用法异同?