A. short
B. new
C. entire
D. good
第1题:
●试题三
阅读下列函数说明和C代码,将应填入(n)处的字句写在答题纸的对应栏内。
【说明】
函数move(int*a,int n)用于整理数组a[]的前n个元素,使其中小于0的元素移到数组的前端,大于0的元素移到数组的后端,等于0的元素留在数表中间。
令a[0]~a[low-1]小于0(初始为空);a[low]~a[i-1]等于0(初始为空);a[i]~a[high]还未考察,当前考察元素为a[i]。a[high+1]~a[n-1]大于0(初始为空)。
【函数】
move(int*a,int n)
{
int i,low,high,t;
low=i=0;high=n-1;
while( (1) )
if(a[i]<0)
{
t=a[i];a[i]=a[low];a[low]=t;
(2) ;i++;
}
else if( (3) )
{t=a[i];a[i]=a[high];a[high]=t;
(4) ;
}
else (5) ;
}
●试题三
【答案】(1)i<=high(2)low++(3)a[i]>0(4)high--(5)i++
【解析】程序的说明已经对程序的功能和相关变量解释得很清楚了,这儿就不再重复了。由变量i、变量low和变量high的含义和初值可以判断,i至high之间的元素还未处理,因此while循环条件是"i<=high"或其等价形式,这就是(1)空所填写的内容。
(2)空所在语句块是处理当a[i]<0的情况,显然这时需要将a[i]与a[low]进行交换,交换后需要将i和low都要向后移动,因此(2)空处应填写"low++"或其等价形式。
(3)空需要填写执行(4)空所在语句块的条件,由(4)空所在语句块的可以判断,它是处理当a[i]>0的情况,因此(3)空处应填写"a[i]>0"或其等价形式。当a[i]>0时,需要将a[i]与a[high]进行交换,交换后需要将high都要向前移动,因此(4)空处应填写"high--"或其等价形式。注意这时i不能向后移动,因为交换后的a[i]还没有处理,需要循环的下一趟进行处理。
当a[i]=0情况,当a[i]=0时,不需要进行元素交换,只需将i向后移动就可以了,因此(5)空处应填写"i++"或其等价形式。
第2题:
A. won’t take
B. didn’t take
C. not take
D. don’t take
第3题:
A、I like to
B、I would
C、I'll
第4题:
第5题:
You like tennis, _______ I'd rather read.
A: while
B: when
C: as
D: since
第6题:
A、highly/ highly
B、highly/ high
C、high/ highly
D、high/ high
第7题:
You' ll tell John about that, won’t you ? -Yes, I'll tell him about it as soon as he( ).
A. will wake up
B. wakes up
C. is waking up
D. woke up
第8题:
I’ll go for a walk with you if it ____ tomorrow.
A. won’t rain
B. doesn’t rain
C. will rain
D. not rains
第9题:
25. —I'm afraid the meeting has begun.
—Don't worry. It _________ . until the bell _________.
A. doesn't begin; rings
B. won't begin; will ring
C. won't begin; rings
D. doesn't begin; will ring
第10题: