题目:两个字符串连接程序

题目:两个字符串连接程序

There is no nutrition in the blog content. After reading it, you will not only suffer from malnutrition, but also impotence.

The blog content is all parallel goods. Those who are worried about being cheated should leave quickly.

1.程序分析:

2.程序源代码:

#include "stdio.h"

main()

{char a[]="acegikm";

char b[]="bdfhjlnpq";

char c[80],*p;

int i=0,j=0,k=0;

while(a[i]!='\0'&&b[j]!='\0')

{if (a[i] { c[k]=a[i];i++;}

else

c[k]=b[j++];

k++;

}

c[k]='\0';

if(a[i]=='\0')

p=b+j;

else

p=a+i;

strcat(c,p);

puts(c);

}

相关推荐
RuoZoe1 天前
重塑WPF辉煌?基于DirectX 12的现代.NET UI框架Jalium
c语言
祈安_4 天前
C语言内存函数
c语言·后端
norlan_jame6 天前
C-PHY与D-PHY差异
c语言·开发语言
czy87874756 天前
除了结构体之外,C语言中还有哪些其他方式可以模拟C++的面向对象编程特性
c语言
m0_531237176 天前
C语言-数组练习进阶
c语言·开发语言·算法
Z9fish6 天前
sse哈工大C语言编程练习23
c语言·数据结构·算法
代码无bug抓狂人6 天前
C语言之单词方阵——深搜(很好的深搜例题)
c语言·开发语言·算法·深度优先
CodeJourney_J6 天前
从“Hello World“ 开始 C++
c语言·c++·学习
枫叶丹46 天前
【Qt开发】Qt界面优化(七)-> Qt样式表(QSS) 样式属性
c语言·开发语言·c++·qt
with-the-flow6 天前
从数学底层的底层原理来讲 random 的函数是怎么实现的
c语言·python·算法