实验5-7 编写程序,将两个字符串连接起来,不要用strcat函数。
来源:互联网 发布:沙迪克火花机编程 编辑:程序博客网 时间:2024/05/18 01:59
#include<stdio.h>
#include<string.h>
int main() {
char a[20]="Hello", b[20]=" world";
int i;
for (i = strlen(a)+1; i < 20; i++)
a[i]= b[i-strlen(a)];
for (i = 0; i < 20; i++)
printf("%c", a[i]);
return 0;
}
#include<string.h>
int main() {
char a[20]="Hello", b[20]=" world";
int i;
for (i = strlen(a)+1; i < 20; i++)
a[i]= b[i-strlen(a)];
for (i = 0; i < 20; i++)
printf("%c", a[i]);
return 0;
}
阅读全文
0 0
- 实验5-7 编写程序,将两个字符串连接起来,不要用strcat函数。
- 7.13 编写一个程序,将两个字符串连接起来,不要用strcat函数。
- 将两个字符串连接起来,不要用strcat函数。
- 编一个程序,将两个字符串连接起来,不要用strcat函数。
- 编一程序,将两个字符串连接起来,不要用strcat函数。
- 习题 6.13 编一程序,将两个字符串连接起来,不要用strcat函数。
- 将两个字符串连接起来,不要用strcat
- 【c语言】将两个字符串连接起来,不要用strcat函数
- 编一程序,将两个字符串连接起来,用strcat.
- 编写一个函数,将两个字符串连接起来。(不能用strcat函数)。
- 编一程序,将两个字符串连接起来,即实现strcat函数功能
- 输入两个字符串,不用系统提供的函数strcat,自定义函数将两个字符串连接起来。
- 不用strcat函数,编写程序,将两个字符串串接起来。
- 写一个函数,将两个字符串连接,即编写一strcat函数
- 编写一程序,将两个字符串连接起来的3种方法
- 将两个字符串连接起来 用string
- 编写一个程序,将两个字符串链接起来,结果取代第一个字符串。要求用方法
- 将两个字符串连起来,不用strcat函数,新手版
- Windows环境下VS2010编译openssl库
- Byte-of-python笔记代码2:module.py
- 自顶向下,逐步求精
- Tomcat配置Https
- 在没有DOM操作的日子里,我是怎么熬过来的(上)
- 实验5-7 编写程序,将两个字符串连接起来,不要用strcat函数。
- 安卓开发环境搭建后碰到的疑难问题
- 分析函数
- 免费VPN地址及设置方法(适用于win7 win8.1 win10)
- 9、HTNL5全局属性
- 使用 D: 盘作为 Windows VM 上的数据驱动器
- css-散记
- automake,autoconf使用详解
- Unity 《知识技能碎片》Unity 富文本(RichText)的使用使UI效果更丰富