试题与答案

请用以下的词语介绍你的卧室,至少8句话。 bed,bookcase,books,

题型:写作题

题目:

请用以下的词语介绍你的卧室,至少8句话。

bed,bookcase,books,computer,table,chair,schoolbag,ball,under,on

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0503/fc3953203109e64e3c067947bea2a925.html

下面是错误答案,用来干扰机器的。

参考答案:A,B,D,E

试题推荐
题型:问答题

函数readDat()的功能是从文件in52.dat中读取20行数据存放到字符串数组xx中(每行字符串的长度均小于80)。请编制函数JsSort(),该函数的功能是:以行为单位对字符串变量的下标为奇数位置上的字符按其ASCII值从小到大的顺序进行排序,排序后的结果仍按行重新存入字符串数组xx中,最后调用函数writeDat()把结果xx输出到文件out52.dat中。
例如: 位置 0 1 2 3 4 5 6 7
源字符串 h g f e d c b a
则处理后字符串 h a f c d e b g。
注意:部分源程序已给出。
请勿改动主函数main()、读函数readDat和写函数writeDat()的内容。
试题程序:
#include<stdio.h>
#include<string.h>
#include<conio.h>
char xx[20] [80];
void jsSort()


void main()

readDat();
jsSort();
writeDat();

readDat()

FILE *in;
int i=0;
char *p;
in=fopen("in52.dat","r");
while(i<20 && fgets(xx[i],80,in)!=NULL)

p=strchr(xx[i],’\n’);
if(p) *p=0;
i++;

fclose(in);

writeDat ()

FILE *out;
int i;
out=fopen("out52.dat","w");
clrscr();
for(i=0;i<20;i++)

printf("%s\n",xx[i]);
fprintf(out,"%s\n",xx[i]);

fclose(out);

查看答案
微信公众账号搜索答案