JOHN: It seems that the new project in Nanjing will be even better than your current project....
BOB: ___1__That is really an exciting project, and I hope our plan will be approved by the board.
JOHN: Good luck! But unfortunately, from what I’ve seen so far, ___2__the Jinan project does not seem to __3___. Is there any problem I can help with
BOB: Don’t worry! Please believe me that ___4__and I’ll get it back on track soon.
JOHN: I’m sure you can straighten things out. Well,___5__, Bob.
A. everything is under control
B. keep up the good work
C. You got it!
D. I must mention that
E. be up to your usual standard
第1题:
A、int*p=newint[30]
B、int*p=newint(30)
C、int*p=new[30]int*p=new[30]
D、*p=newint[30]
第2题:
阅读下列函数说明和C代码,将应填入(n)处的字句写在对应栏内。
【说明】
设有一个带表头结点的双向循环链表L,每个结点有4个数据成员:指向前驱结点的指针prior、指向后继结点的指针next、存放数据的成员data和访问频度freq。所有结点的freq初始时都为0。每当在链表上进行一次L.Locate(x)操作时,令元素值x的结点的访问频度 freq加1,并将该结点前移,链接到现它的访问频度相等的结点后面,使得链表中所有结点保持按访问频度递减的顺序排列,以使频繁访问的结点总是靠近表头。
【函数】
void Locate( int &x)
{ <结点类型说明>
* p =first -> next;
while(p!=frist&&(1))P=P->next;
if(p! =first) /*链表中存在x*/
{(2);
<结点类型说明>
* current = P; /*从链表中摘下这个结点*/
Current -> prior -> next = current -> next;
Current -> next -> prior = current -> prior;
P = current -> prior; /*寻找重新插入的位置*/
While(p! =first &&(3))p=p->prior;
Current-> next =(4); /*插入在P之后*?
Current -> prior = P;
P -> next -> prior = current;
P->next=(5);
}
else printf("Sorry. Not find! \n"); /*没找到*/
}
第3题:
Aread(p,q);
Bp^:=q^
Cp:=p+1
Dp:=p+q;
第4题:
第5题:
下列语句错误的是( )。
A.char*p="John";P[2]='a';
B.char name[5]="John";name[2]='a'
C.char name[5]="John",*p=name;p[2]='a';
D.char name[5]="John",*p=&name[2];*p='a';
第6题:
Your argument ____ that human nature is essentially the same everywhere.
A、guess
B、pretends
C、assumes
D、seems
第7题:
下列语句错误的是( )。
A.char*p="John";p[2]='a';
B.char name[5]="John";name[2]='a'
C.char name[5]="John",*p=name;p[2]='a';
D.char name[5]="John",*p=&name[2];*p='a';
第8题:
●试题三
阅读下列函数说明和C代码,将应填入(n)处的字句写在答题纸的对应栏内。
【说明】
设有一个带表头结点的双向循环链表L,每个结点有4个数据成员:指向前驱结点的指针prior、指向后继结点的指针next、存放数据的成员data和访问频度freq。所有结点的freq初始时都为0。每当在链表上进行一次L.Locate(x)操作时,令元素值x的结点的访问频度freq加1,并将该结点前移,链接到现它的访问频度相等的结点后面,使得链表中所有结点保持按访问频度递减的顺序排列,以使频繁访问的结点总是靠近表头。
【函数】
void Locate(int &x)
{<结点类型说明>
*p=first->next;
while(p!=frist && (1) )P=P->next;
if (p!=first)/*链表中存在x*/
{ (2) ;
<结点类型说明>
*current=p;/*从链表中摘下这个结点*/
Current->prior->next=current->next;
Current->next->prior=current->prior;
P=current->prior;/*寻找重新插入的位置*/
While(p!=first && (3) )p=p->prior;
Current->next= (4) ;/*插入在P之后*?
Current->prior=P;
P->next->prior=current;
P->next= (5) ;
}
else printf("Sorry.Not find!\n");/*没找到*/
}
●试题三
【答案】(1)p->data!=x(2)p->freq++(3)current->freq>p->freq(4)p->next
(5)current
【解析】(1)空所在的循环是定位x,将指针指向x结点(如存在的话),因此(1)空应填写"p->data!=x"。显然,(2)空是使该结点的访问频度加1,因此(2)空应填写"p->freq++"。(3)空所在的循环是根据访问频度定位x结点的新位置,用P指向x结点的前驱,因此(3)空处应填"current->freq>p->freq"。
(4)、(5)空之间的语句是将结点x插入在P之后。(4)空所在语句是将指针P指向x结点的前驱,因此(4)空应填写"p->next"。(5)空所在语句是将P后继指向结点current,因此空(5)处应填写"current"。
第9题:
第10题:
【多选题】下列选项中, 关于标签指定式选择器的写法正确的是()
A.p.current{color:red;}
B.div current{color:red;}
C.div#current{color:red;}
D..current.p{color:red;}