I don’t want to come out now, and ( ), I’m expecting a phone call.
A、besides
B、therefore
C、including
D、likewise
第1题:
学生的记录由学号和成绩组成,N名学生的数据已在主函数中放入结构体数组s中,请编写函数fun(),该函数的功能是:把高于等于平均分的学生数据放在b所指的数组中,低于平均分的学生数据放在c所指的数组中,高于等于平均分的学生人数通过形参n传回,低于平均分的学生人数通过形参m传回,平均分通过函数值返回。
注意:部分源程序给出如下。
请勿改动主函数main和其他函数中的任何内容,仅在函数fun的花括号中填入所编写的若干语句。
试题程序:
include <stdio.h>
define N 12
typedef struct
{char num[10];
double S;
} STREC;
double fun(STREC *a,STREC *b,STREC *C,int *n,int *m)
{
}
main()
{
STREC s[N]={{“GA05”,65},{“GA03”,86},
{“GA02”,76},{“GA04”,95},{“GA01”,93},
{“GA07”,78},{“GA08”,68},{“GA06”,88},
{“GA09”,60},{“GAll”,54},{“GAl2”,56},
{“GAl0”,98}};
STREC h[N],l[N],t;
FILE *out;
int i,j,m,n;
double ave;
ave=fun(S,h,l,&n,&m);
printf("The %d student data which is higher than %7.3f:\n",n,ave);
for(i=0;i<n;i++)
printf("%s %4.lf\n",h[i].num,
h[i].s);
printf("\n");
printf("The %d Student data which iS lower than%7.3f:\n",m,ave);
for(i=0;i<m;i++)
printf("%s %4.1f\n",l[i].num, l[i].s);
printf("\n");
ut=fopen("out26.dat", "w");
fprintf(out, "%d\n %7.3f\n",n,ave);
for(i=0;i<n-1;i++)
for(j=i+1;i<n;j++)
if(h[i].s<h[j].s)
{t=h[i];h[i]=h[i];h[j]=t;}
/*分数从现到低排列*/
for(i=0;i<n; i++)
fprintf(out,“%4.1f\n",h[i].s);
fprintf(out,"%d\n %7.3f\n",m,ave);
for(i=0;i<m-1;i++)
for(j=i+1;i<m;j++)
if(l[i].s<l[j].s)
{t=l[i];l[i]=l[j];l[j]=t;}
/*分数从高到低排列*/
for(i=0;i<m;i++)
fprintf(out,"%4.1f\n",l[i].s);
fclose(out);
}
第2题:
请阅读下面程序 public class ThreadTest{ public static void main(String args[])throws Ex- ception{ int i=0; Hello t=new Hello; ; while(true){ System.Out.println("Good Morning"+i++): if(i= =2t.isAlive){ System.out.println("Main waiting for Hel- lo!"); join;//等待t运行结束 } if(i= =5)break;} } } class Hello extends Thread{ int l; public void run{ while(true)( System.Out.println("Hell0"+i++); if(i= =5)break;)))
A.t.sleep
B.t.yield
C.t.interrupt
D.t.start
第3题:
请阅读下面程序 publicclassThreadTest{ publicstaticvoidmain(Stringargs[])throwsException{ inti=0; Hellot=newHello(); ______, while(true){ System.out.println("GoodMoming"+i++); if(i==2&&t.isAlive()){ System.out.println("MainwaitingforHello!"); t.join();//等待t运行结束 } if(i==5)break;} } } classHelloextendsThread{ inti; publicvoidrun(){ while(true){ System.out.println("Hello"+i++); if(i==5)break;}}} 为使该程序正确执行, 下划线处的语句应是( )。
A.t.sleep()
B.t.yield()
C.t.interrupt()
D.t.start()
第4题:
–– Host: Jack, come and sit in the sofa. Dinner will be ready in a minute. Could I get you something to drink?
–– Guest: ____.
A: No, don ’t trouble. I ’ve drunk enough
B: No, you couldn't. I'm not thirsty
C: Yes, you could. I ’d like some Coca cola
D: Yes, please. I'd like some Sprite
第5题:
I______to be a scientist when I______ a boy.
A、wanted, was
B、want, am
C、wanted, am
D、want, was
第6题:
-- Ann is in hospital.
-- Oh, really? I __ know. I __ go and visit her.
A. didn’t; am going to B. don’t; would
C. don’t; will D. didn't; will