一、N-S流程图;
二、运行结果;
三、源代码;
# define _CRT_SECURE_NO_WARNINGS
# include <stdio.h>
int main()
{
//初始化变量值;
int i = 0;
char a[100], b[100];
//获取字符串;
printf("请为数组a输入字符串:");
gets(a);
//复制;
for (i = 0; i <= strlen(a); i++)
{
//复制;
b[i] = a[i];
}
//输出结果;
printf("字符串a为:%s\n", a);
printf("字符串b为:%s\n", b);
return 0;
}