I can’t move the piano without ().
A.resistance
B.assistance
C.existence
D.dependence
A.resistance
B.assistance
C.existence
D.dependence
A: Hey, Lily, what are you doing? L: ___________ for someone. A: You mean the boy you met on WeChat? L: You’re right. He is so ___________ and I think I fall in love with him. A: You must be joking. You can’t fall in love with someone you’ve never met! L: I know, but I keep thinking of him every day. And I get really depressed (沮丧的) when he’s not online. A: I think you just have a crush on him. You can’t be serious. L: Well, this might be silly. But I just can’t get him off my ___________. And I can’t help missing him. A: Did you tell him? L: Yes. He said I’m his dream girl. A: You shouldn’t take it too seriously. It might be a _______. L: I know. I can’t tell whether he’s serious or not so I need your ___________. A: I think you should enlarge your circle of real-life friends, and then the right person will come along.
I'm sorry I can't go with you, but I wish you ().
A.to have a good time
B.a good time
C.have a good time
D.will have a good time
●试题四
阅读以下说明和C代码,将应填入(n)处的字句写在答题纸的对应栏内。
【说明】
从文件IN.DAT中读取一篇英文文章存入到字符串数组XX中;请编写程序,其功能是:以行为单位把字符串中所有小写字母o左边的字符串内容移到该串的右边存放,然后把小写字母o删除,余下的字符串内容移到已处理字符串的左边存放。最后把已处理的字符串仍按行重新存入字符串数组XX中,最后调用函数WRITEDAT(),把结果XX输出到文件OUT5.DAT中。
例如:原文:You can create an index on any field.
you have the correct record.
结果:n any field.Yu can create an index
rd.yu have the crrect rec
原始数据文件存放的格式是:每行的宽度均小于80个字符,含标点符号和空格。
【函数】
#include "stdio.h"
#include "string.h"
#include "conio.h"
#include "ctype.h"
#include "mem.h"
unsigned char xx[50][80];
int maxline=0;
int readdat(void);
void writedat(void);
/*将题目要求的字符串中所有小写字母o左边的字符串内容移到该串的右边存放,即
将串中"最后"一个字母o左右两侧的内容互换*/
void StrOR(void)
{
inti;
char*p1,*p2,t[80];
for(i=0;i<maxline;i++)
{ t[0]=′/0′;
p2=xx[i];
while(*p2)/*找到最后一个′o′*/
{if((1) )p1=p2;
p2++;
}
strcat(t,p1+1);
*p1=′\\0′;
strcat(t,xx[i]);
p1=xx[i];
p2=t;
while(*p2)/*删去字符′o′*/
{if((2) ) (3) =*p2;
p2++;
}
(4) ;
}
}
void main()
{
clrscr();
if(readdat())
{printf("Can't open the file IN.DAT!\\n");
return;
}
StrOR();
writedat();
}
int readdat(void)
{
FILE*fp;
int i=0;
char*p;
if((fp=fopen("in.dat","r"))==NULL)
return 1;
while(fgets(xx[i],80,fp)!=NULL)
{p=strchr(xx[i],′\\n′);
if(p)
*p=0;
i++;
}
maxline= (5) ;
fclose(fp);
return 0;
}
void writedat(void)
{FILE*fp;
int i;
fp=fopen("in.dat","w");
for(i=0;i<maxline;i++)
{printf("%s\n",xx[i]);
fprintf(fp,"%s\n",xx[i]);
}
fclose(fp);
}
}
}
A.cache
B.pool
C.buffer
D.clipboard
以下程序运行后输入:3,abcde<回车>,则输出结果是【 】
include <string.h>
move(char *str, int n)
{ char temp; int i;
temp=str[n-1];
for(i=n-1;i>0;i--) str[i]=str[i-1];
str[0]=temp;
}
main()
{ char s[50]; int n, i, z;
scanf("%d,%s",&n,s);
z=strlen(s);
for(i=1; i<=n; i++) move(s, z);
printf("%s\n",s);
}
Since risk is associated with most projects,the best course of action is to ()
A.cover all project risks by buying appropriate insurance
B.ignore the risks,since nothing can be done about them and move forward with the project in an expeditious manner
C.avoid project with clear and present risk
D.identify various risks and implement actions to mitigate their potential impact
A.T(n)=T(n-1)+1
B.T(n)=2T(n-1)
C.T(n)=2T(n-1)+1
D.T(n)=2T(n+1)+1
Since risk is associated with most projects,the best course of action is to (71)
A.cover all project risks by buying appropriate insurance
B.ignore the risks,since nothing can be done about them and move forward with the project in an expeditious manner
C.avoid project with clear and present risk
D.identify various risks and implement actions to mitigate their potential impact
●试题八
阅读下列函数说明和C代码,将应填入(n)处的字句写在答题纸的对应栏内。
【说明】
以下程序的功能是:从键盘上输入一个字符串,把该字符串中的小写字母转换为大写字母,输出到文件test.txt中,然后从该文件读出字符串并显示出来。
【程序】
#include<stdio.h>
main()
{FILE*fp;
charstr[100];inti=0;
if((fp=fopen("text.txt" (1) ))==NULL)
{printf("can't open this file.\n");exit(0);}
printf("input astring:\n");gest(str);
while(str[i])
{if(str[i]>=′a′ && str[i]<=′z′)
str[i]= (2) ;
fputc(str[i], (3) );
i++;
}
fclose(fp);
fp=fopen("test.txt", (4) );
fgets(str,100,fp);
printf("%s\n",str);
(5) ;
}
有以下程序:#include <iostream>using namespace std;class A{public: A(int i,int j) { a=1; b=j; } void move (int x,int y) { a+=x; b+=y; } void show() cout<<a<<","<<b<<end1 } private: int a,b; }; class B : private A { public: B(int i,int 3):A (i,j) {} void fun() { move (3,5); } void f1() { A::show(); } }; int main() { B d(3,4); d.fun(); d.f1(); return 0; } 程序执行后的输出结果是
A.3,4
B.6,8
C.6,9
D.4,3
若有以下程序 #include <iostream> using namespace std; class A { public: A(int i,int j) { a=i; b=j; } void move(int x, int y) { a+=x; b+=y; } void show() { cout < <a < <" , " <<b<< end1; } private: int a,b; }; class B : private A { public: B(int i,int j) :A(i,j) {} void fun () { move (3, 5); } void f1 () { A::show(); } }; int main () { B d(3,4); d. fun (); d.f1(); return 0; } 程序执行后的输出结果是 ()。
A.3,4
B.6,8
C.6,9
D.4,3