Section A
Directions: This section is to test your ability to understand short dialogues. There are 5 recorded dialogues in it. After each dialogue, there is a recorded question. The dialogues and the questions will be spoken only once. When you hear a question, you should decide on the correct answer from the 4 choices A , B, C, and D.
(1)
A.Tea.
B.Wine.
C.Coffee.
D.Water.
第1题
有下列程序:
#include<stdi0.h>
structst
{intx,Y,date[2]={1,10,2,20};
voidmain()
{structst*p=date;
printf("%d,",p->y);printf("%d\n",(++p)
->x);
}
程序的运行结果是()。
A.10,1
B.20,1
C.10,2
D.20,2
第2题
有如下程序: #include<iostream> usingnamespacestd; classDA{ intk; public: DA(intx=1):k(x){} ~DA(){cout<<k;} }; intmain(){ DAd[]={DA(3),DA(3),DA(3)); DA+p=newDA[2]; delete[]p; return(); } 这个程序的输出结果是()。
A.111
B.333
C.11333
D.11133
第3题
有如下程序:
#include<iostream>
usingnamespacestd;
classDA{
intk;
public:
DA(intx=1):k(x){}
~DA(){cout<<k;}
};
intmain(){
DAd[]={DA(3),DA(3),DA(3));
DA+p=newDA[2];
delete[]p;
return();
}
这个程序的输出结果是()。
A.111
B.333
C.11333
D.11133
第4题
有下列程序: #include<stdi0.h> voidmain() {intx=1,y=2,z=3; if(x>y) if(y<z)print{("%d",++z); elseprintf("%d",++y); printf(”%d\n”,x++); } 程序的运行结果是()。
A.331
B.41
C.2
D.1
第5题
有下列程序:
#include<stdi0.h>
voidmain()
{intx=1,y=2,z=3;
if(x>y)
if(y<z)print{("%d",++z);
elseprintf("%d",++y);
printf(”%d\n”,x++);
}
程序的运行结果是()。
A.331
B.41
C.2
D.1
第6题
有下列程序: include
voidmain()include<stdi0.h>
voidmain()
{intx=1,y=2,z=3;
if(x>y)
if(y<z)print{("%d",++z);
elseprintf("%d",++y);
printf(”%d\n”,x++);
}
程序的运行结果是()。
A.331
B.41
C.2
D.1
第7题
有下列程序:
#include<stdi0.h>
structord
{intx,y;}dt[2]={1,2,3,4};
voidmain()
{structord*p=dt;
printf("%d,",++P->x);printf("%d,",++P
->y);
}
程序的运行结果是().
A.1,2
B.2,3
C.3,4
D.4,1
第8题
例如,当s中的数为7654321时,t中的数为7531。请改正程序中的错误,使它能得出正确的结果。
注意:部分源程序在文件MODll.C中,不得增行或删行,也不得更改程序的结构!
include<;stdi0.h>;
第10题
有下列程序: #include<stdi0.h> intf(intx) { inty; if(x==0‖x==1)return(3); y=x*x-f(X-2); returny; } voidmain() { intZ; z=f(3);printf("%d\n",z); } 程序的运行结果是()。
A.0
B.9
C.6
D.8
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!