简答题:请编写函数proc(),该函数的功能是:将放在字符串数组中的M个字符串(每串的长度不超过N),按顺序合并组成一个新的字符

  • 题目分类:C语言
  • 题目类型:简答题
  • 查看权限:VIP
题目内容:
请编写函数proc(),该函数的功能是:将放在字符串数组中的M个字符串(每串的长度不超过N),按顺序合并组成一个新的字符串。
例如,若字符串数组中的M个字符串为:
ABCD
BCDEFG
CDEFGHI
则合并后的字符串内容应该是ABCDBCDEFGCDEFGHI。
注意:部分源程序给出如下。
请勿改动main()函数和其他函数中的任何内容,仅在函数proc()的花括号中填入所编写的若干语句。
试题程序:
#include<stdio.h>
#include<conio.h>
#define M 3
#define N 20
void proc(char arr[M][N].char*b)
{
}
void main()
{
char str[M][N]={”ABCD”,”BCDEFG”,”
CDEFGHl”),i;
char arr[100]={”#############
#####”);
printf(”The string:\n”);
for(i=0;i<2M;i++)
puts(str[i]);
printf(”\n”);
proc(str,arr);
printf(”The A string:\n”);
printf(”%S”,arr);
printf(”\nln”);
}
参考答案:
答案解析:

What kind of film does the speaker like?

What kind of film does the speaker like?A.action films B.humorous films C.horro

查看答案

You can get help by visiting KellyAutoSpares' website.

You can get help by visiting KellyAutoSpares' website.A.Right B.Wrong C.Doesn't

查看答案

Jan Whittaker has a box of faulty goods which a shop has se

Jan Whittaker has a box of faulty goods which a shop has sent back.

查看答案

论述记忆系统的三个信息加工阶段。

论述记忆系统的三个信息加工阶段。

查看答案