使用指针连接两个字符串
来源:互联网 发布:只会php有用吗 编辑:程序博客网 时间:2024/05/16 06:19
#include<stdio.h>void connect(char *st1, char *st2, char *q){for(;*st1!='\0';){*q=*st1;st1++;q++;}for(;*st2!='\0';){*q=*st2;st2++;q++;}*q='\0';}int main(){char str1[]={"I love you"}, str2[]={" girl friend"};char *p;char c[60];p=c;printf("The first string is:%s\n",str1);printf("The second string is:%s\n",str2);connect(str1,str2,p);printf("THe connected string is :%s\n",p);printf("\n");return 0;}
0 0
- 使用指针连接两个字符串
- 使用指针连接字符串
- C语言 指针连接两个字符串(一)
- 2809: 使用指针连接字符串。
- 连接两个C_style字符串
- 连接两个字符串
- 两个字符串连接
- 连接两个字符串
- 连接两个字符串
- 两个字符串连接
- 连接两个字符串
- 连接两个字符串
- 两个字符串连接
- 两个字符串连接
- C++连接两个字符串
- 第十六周项目 2 用指针玩字符串——连接两个字符串
- 第十六周项目二 用指针玩转字符串-连接两个字符串
- 用指针连接字符串
- eclipse运行android时Console最后提示Done!不运行程序
- 虚函数和纯虚函数的作用与区别 http://blog.csdn.net/xwpc702/article/details/8670025
- 用指针实现逆序列存放数组元素值
- layer插件API文档学习
- C/C++之回调函数
- 使用指针连接两个字符串
- css 选择符
- 设计原则(三)组合复用原则
- jqmobi如何把返回的back改为中文
- 《Windows核心编程》の托盘程序的编写(CSystemTray类) (转)
- MaskFilter 介绍
- mount文件系统挂载
- Educational Codeforces Round 1 C.Nearest vectors(排序)
- python 切片