Though he was 80 years old, blind and hardly able to walk, his family ________ him so
A、was attached in
B、was attached to
C、was featured in
D、was featured to
A、was attached in
B、was attached to
C、was featured in
D、was featured to
A.if
B.unless
C.because
D.though
The notion of NP-completeness has provided a(66)mathematical definition for(67)intractability of NP problems. But this measure applies only to worst-case complexity. Being NP-complete does not(68)that a problem is intractable on the average case. Indeed, some NP-complete problems are "(69)on average", though some may not be. Levin initiated the study of average-case intractability, He showed that a bounded tiling problem under a simple distribution is average-case NP-complete. Since then, several additional average-case NP-complete problems have been shown within Levin's(70). This paper is intended to provide a comprehensive survey of average-case NP-complete problems that have been published so far, and the techniques of obtaining these results.
A.relaxed
B.rough
C.rigorous
D.feasible
The Dutch got the ball rolling by celebrating the saint- called Sinter Klaas- in New York in the latc-18" century. Our old friend, Washington Irving, included the legend of Saint Nick in his seminal History of New York as well, but at the turn of the 181 century, Saint Nick was still a rather () figure in America.
On December 23, 1823, though, a man named Clement Clarke Moore published a poem he had written for his daughters called “An Account of a Visit from St. Nicholas," better known now as ‘T’ as the night before Christmas." Nobody knows how much of the poem Moore invented, but we do know that it was the spark that () lit the Santa fire. Many of the things we associated with Santa一a sleigh, reindeer, Christmas Eve visits一came from Moore's poem.
1.
A.hops
B.jumps
C.sneaks
D. skips
2.
A.known
B.observed
C. remarked
D.commented
3.
A.persistance
B.inheritance
C.insistence
D.instance
4.
Awell-known
B.popular
C.obscure
D.famous
5.
A. actually
B. generally
C. eventfully
D. eventually
● 针对下列程序段,需要(58)个测试用例可以满足分支覆盖的要求。
int IsLeap(int year)
{
if (year % 4 == 0 )
{
if ((year % 100 == 0 )
{
if (year % 400 == 0 )
leap = 1;
else
leap = 0;
}
else
leap = 1;
}
else
leap = 0;
return leap;
}
(58)
A.3
B.4
C.6
D.7
A.SELECT姓名,性别,YEAR(DATE())-YEAR(出生日期)年龄FROM职工; WHERE年龄>35
B.SELECT姓名,性别,YEAR(DATE())-YEA良(出生日期)年龄FROM职工; WHERE YEAR(出生日期)>35
C.SELECT姓名,性别,YEAR((DATE())-YEAR(出生日期)年龄FROM职工; WHERE YEAR(DATE())-YEAR(出生日期)>35
D.SELECT姓名,性别,年龄=YEAR(DATE())-YEAR(出生日期)FROM职工; WHEREYEAR(DATE())-YEAR(出生日期)>35
阅读以下说明和C代码,将应填入(n)处的字句写在对应栏内。
【说明】
该程序的功能是从文件IN.DAT中读取一篇英文文章存入到字符串数组xx中,以行为单位对行中以空格或标点符号为分隔的所有单词进行倒排。最后把已处理的字符串(应不含标点符号)仍按行重新存入字符串数组xx中,最后把结果xx输出到文件OUT6.DAT中。
例如:原文:You He Me
I am a student.
结果:Me He You
student a am I
原始数据文件存放的格式是:每行的宽度均小于80个字符,含标点符号和空格。
【函数】
include<string.h>
include<conio.h>
include<ctype.h>
include<stdio.h>
char xx[50] [80];
int maxline=0; /*文章的总行数*/
int ReaaDat(void);
void WriteDat(void);
void StrOL(void)
{
char * p1, * p2,t[80];
int i;
for(i=0;i<maxline;i++)
{ p1=xx[i];t[0]=0;
while(*p1)p1++;
while(p1>=xx[i])
{ while(!isalpha(*p1) &&p1!=xx[i])p1--;
p2=p1;
while((1))p1--;
if(p1==xx[i])
if(isalpha(*p1))p1--;
else if(!isalpha(*(p1+1)))break;
p2++;
(2);
strcat(t, p1+1);
strcat(t," ");
}
strcpy(xx[i],t);
}
}
void main()
{
if((3)) {
printf("数据文件in.dat不能打开!\n\007" );
return;
}
StroL();
writeDat();
getch();
} int ReadDat(void)
{
FILE * fp;
int i =0;
char * p;
if((fp=fopen("e:\a\in.dat"," r" ))==NULL)return 1;
while(fgets(xx[i],80,fp)!=NULL) {
p=strchr(xx[i],'\n')
if(p)*p=0;
i++;
}
maxline=(4)
fclose(fp);
return 0;
}
void WriteDat(void)
{
FILE * fp;
int i;
fp=fopen("e:\\a\\out6,dat","w");
for(i=0;i<(5);i++){
printf("%s\n",xx[i]);
fprintf(fp,"%s\n",xx[i])
}
fclose(fp)
}
●试题四
阅读以下说明和C代码,将应填入(n)处的字句写在答题纸的对应栏内。
【说明】
该程序的功能是从文件IN.DAT中读取一篇英文文章存入到字符串数组xx中,以行为单位对行中以空格或标点符号为分隔的所有单词进行倒排。最后把已处理的字符串(应不含标点符号)仍按行重新存入字符串数组xx中,最后把结果xx输出到文件OUT6.DAT中。
例如:原文:You He Me
I am a student.
结果:Me He You
student a am I
原始数据文件存放的格式是:每行的宽度均小于80个字符,含标点符号和空格。
【函数】
#include<string.h>
#include<conio.h>
#include<ctype.h>
#include<stdio.h>
char xx[50][80];
int maxline=0;/*文章的总行数*/
int ReaaDat(void);
void WriteDat(void);
void StrOL(void)
{
char*pl,*p2,t[80];
int i;
for(i=0;i<maxline;i++)
{p1=xx[i];t[0]=0;
while(*p1)p1++;
while(p1>=xx[i])
{while(!isalpha(*p1)&&p1!=xx[i])p1--;
p2=p1;
while((1) )p1--;
if(p1==xx[i])
if(isalpha(*p1))p1--;
else if(!isalpha(*(p1+1)))break;
p2++;
(2) ;
strcat(t,p1+1);
strcat(t," ");
}
strcpy(xx[i],t);
}
}
void main()
{
if((3) ){
printf("数据文件in.dat不能打开!\n\007");
return;
}
StrOL();
writeDat();
getch();
}
int ReadDat(void)
{
FILE*fp;
int i=0;
char*p;
if((fp=fopen("e:\\a\\in.dat","r"))==NULL)return 1;
while(fgets(xx[i],80,fp)!=NULL){
p=strchr(xx[i],′\n′);
if(p)*p=0;
i++;
}
maxline= (4)
fclose(fp);
return 0;
}
void WriteDat(void)
{
FILE*fp;
int i;
fp=fopen("e:\\a\\out6.dat","w");
for(i=0;i< (5) ;i++){
printf("%s\n",xx[i]);
fprintf(fp,"%s\n",xx[i]);
}
fclose(fp);
}
Though the hotel has only been open for a few days, it is already () booked.
A.expectantly
B.quickly
C.heavily
D.immediately
A.Though,but
B.But,though
C.Though,/
D.But,/
A. If
B. Despite
C. Though
D. Since
A that
B the reason for
C why
D why that