5-3
来源:互联网 发布:ubuntu安装vlc播放器 编辑:程序博客网 时间:2024/05/02 11:26
#include <stdio.h>
#include <stdlib.h>
/*
用指针方式实现strcat.strcat(s,t)将t指向的字符串复制到s指向的字符串尾部
*/
int strcat(char *s,char *t)
{
if( s==NULL)return -1;
while(*s!='/0')
s++;
while( *s++=*t++)
;
return 0;
}
int main(void)
{
char a[1000]={"hello"};
char *b="world";
if( strcat(a,b) !=0)
return -1;
printf("a is :%s",a);
system("pause");
return 0;
}
#include <stdlib.h>
/*
用指针方式实现strcat.strcat(s,t)将t指向的字符串复制到s指向的字符串尾部
*/
int strcat(char *s,char *t)
{
if( s==NULL)return -1;
while(*s!='/0')
s++;
while( *s++=*t++)
;
return 0;
}
int main(void)
{
char a[1000]={"hello"};
char *b="world";
if( strcat(a,b) !=0)
return -1;
printf("a is :%s",a);
system("pause");
return 0;
}
- 5-3
- 3~5
- 3。5
- 3-5
- 5-3
- 3-5
- 5-3
- 3-5
- 5-3
- 练习5-3&&5-4&&5-5
- 2006-3-5 (Sunny)
- SNMP_PP_CHS Charpter 3 - 5
- 2007-3-5
- 09.1.5学习3
- 程序5-3 LineDemo
- CCNA 3 Chapter 5
- 5月3日
- C:1-5-3
- PL/SQL Developer 6.02发布
- DCS操作站的软件应该尽早制订标准
- MVC设计模式小试验
- 雪人棒打企鹅
- [Tip]使用命令行在Windows系统中查看机器配置
- 5-3
- 练习5-4
- 看似多余的接口Set
- Collection框架设计的失误:Stack!
- ASP和JSP的一点区别
- 使用全局鼠标钩子实现右键双击粘贴操作
- [原创]windows2003下安装Borland C++builderX
- 新加了几张西安的小吃照片,快过双节了,让我门一起来怀念把,西安的兄弟们过节多帮我们吃些哦。
- Eclipse界面编写实例(1)--扩展TitleAreaDialog