I've got the order from the boss that the work______finished before 5p. m. today.
A.would be
B.be
C.will have been
D.could be
第1题:
●试题四
下列给定程序中,函数fun()的功能是:对N名学生的学习成绩,按从高到低的顺序找出前m(m≤10)名学生来,并将这些学生数据存放在一个动态分配的连续存储区中,此存储区的首地址作为函数值返回。
注意:部分源程序给出如下。
请勿改动主函数main和其他函数中的任何内容,仅在函数fun()的横线上填入所编写的若干表达式或语句。
试题程序:
#include<stdio.h>
#include<mallo
C.h>
#include<string.h>
#include<conio.h>
#define N 10
typedef struct ss
{
char num[10];
int order;
}STU;
STU *fun(STU a[], int m)
{
STU b[N],*tt;
int i,j,k;
(1) ;
for(i=0; i<N; i++)
b[i]=a[i];
for (k=0;k<m;k++)
{
for(i=j=0;i<N;i++)
if ( (2) )
j=i;
tt[k]=b[j];
b[j].order=0;
}
return (3) ;
}
outresult(STU a[],FILE *pf)
{
int i;
for(i=0;i<N; i++)
fprintf(pf,"No=%s Mark=%d\n",
a[i].num,a[i].order);
fprintf(pf,"\n\n");
}
main()
{
STU [N]={{"A01",80},{"A02",79},
{"A03",66},{"A04",82},{"A05",87},
{"A06",93},{"A07",78},{"A08",60},
{"A09",85},{"A10",73}};
STU *p_order;
int i,m;
clrscr();
printf("*** The Origial data ***\n");
outresult(a, stdout);
printf("\nGive the numeber of the
students who have better score:");
scanf("%d",&m);
while (m>10)
{
printf("\nGive the number of the
studets who have better score:");
scanf("%d",&m);
}
p_order=fun(a,m);
printf("*** THE RESULT ***\n");
printf("*** The top students ***\n");
for(i=0; i<m; i++)
printf(" %s %d\n",
p_order[i].num,p_order[i].order);
free(p_order);
}
●试题四
【答案】(1)tt=(STU*)malloc(sizeof(STU)*m)(2)b[i].order>b[j].order(3)tt
【解析】填空1:tt是结构体STU型指针,声明时并没有进行初始化,所以,需要使用malloc()函数动态申请存储空间。动态申请存储空间的大小取决于函数的形参m。填空2:按成绩高低找出前m名学生的方法是,先假设第一名学生成绩最高,依次与其他学生的成绩进行比较,如果出现成绩更高者,则认为这名学生成绩最高,全部比较完后找到成绩第一名的学生,存入指针tt所指的结构体空间中,同时将这名同学的成绩置0,这样在其他同学中找第一名就相当于找到所有同学中的第二名,依此类推,进行m次循环,找到前m名学生。填空3:题目要求函数值返回动态分配的存储区的首地址,所以返回指针tt。
第2题:
对由SELECT—FROM—WHERE—GROUP—ORDER组成的SQL语句,其在被DBMS处理时,各子句的执序次序(43)。
A.SELECT—FROM—GROUP—WHERE—ORDER
B.FROM—SELECT—WHERE—GROUP—ORDER
C.FROM—WHERE—GROUP—SELECT—ORDER
D.SELECT—FROM—WHERE—GROUP—ORDER
第3题:
A. until
B. as soon as
C. while
D. before
第4题:
对由SELECT--FROM—WHERE—GROUP--ORDER组成的SQL语句,其在被DBMS处理时,各子句的执行次序为()
A.SELECT—FROM—GROUP—WHERE—ORDER
B.FROM——SELECT--WHERE——GROUP——ORDER
C.FROM——WHERE——GROUP——SELECT——ORDER
D.SELECT——FROM——WHERE——GROUP——ORDER
第5题:
B 宽度优先(种子染色法)
5.关键路径
几个定义: 顶点1为源点,n为汇点。
a. 顶点事件最早发生时间Ve[j], Ve [j] = max{ Ve [j] + w[I,j] },其中Ve (1) = 0;
b. 顶点事件最晚发生时间 Vl[j], Vl [j] = min{ Vl[j] – w[I,j] },其中 Vl(n) = Ve(n);
c. 边活动最早开始时间 Ee[I], 若边I由<j,k>表示,则Ee[I] = Ve[j];
d. 边活动最晚开始时间 El[I], 若边I由<j,k>表示,则El[I] = Vl[k] – w[j,k];
若 Ee[j] = El[j] ,则活动j为关键活动,由关键活动组成的路径为关键路径。
求解方法:
a. 从源点起topsort,判断是否有回路并计算Ve;
第6题:
Boss: Come in, please. Oh, Mary, come over (56) Your annual report is well done.
Mary: (57)
Boss: I know you're a capable person.
Mary: Thank you for saying that. (58) the wrong figures I gave you last time.
Boss: (59) Everyone makes mistakes.
Mary: Thank you so much for your forgiveness. (60)
56.
A. I'm leaving
B. Thank you
C. I'll do my best
D. and sit here
E. Please sit down
F. But I worry about
G. Take it easy
H. Don't forget
第7题:
在SELECT语句中,用来指定查询所用的表的子句是A)WHERE B)GROUP BY C)ORDER.BY D)FROM
第8题:
根据以下材料回答第 1~5题:
A.I'm leaving.
B.Thank you
C.I'll do my best
D.and sit here
E.Please sit down
F.But l worry about
G.Take it easy
H.Don’t forget
第 56 题 Boss:Come in,please.Oh,Mary,come over 56 .Your annual report is well done.
Mary: 57
Boss:I know you’re a capable person.
Mary:Thank you for saying that. 58 the wrong figures I gave you last time.
Boss: 59 .Everyone makes mistakes.
Mary:Thank you SO much for your forgiveness. 60.
第9题:
____ quite recently, most mothers in Britain did not take paid work outside the home.
(A) Before (C) From
(B) Until (D) Since
选C
重新调整句子顺序就明白了:
Most mothers in Britain did not take paid work outside the home until quite recently.
意思:
英国大多数的母亲们直到最近才到外面从事有薪水的工作。
not...until...直到......才......
第10题: