【导读】
不凡考网发布2022计算机二级计算机证模拟考试库252相关信息,更多2022计算机二级计算机证模拟考试库252的相关资讯请访问不凡考网计算机类考试频道。
1. [单选题]窗体上有两个文本框Text1、Text2以及一个命令按钮Command1,编写下列程序: Dim y As IntegerPrivate Sub Command1_Click()Dim x As Integer x=2 Text1.Text=p2(p1(x), y) Text2.Text=pi(x)End SubPrivate Function p1(x As Integer) As Integer x=x+y:y=x+y p1=x+yEnd FunctionPrivate Function p2(x As Integer, y As Integer) As Integer p2=2*x+yEnd Function 当单击1次和单击2次命令按钮后,文本框Text1和Text2内的值分别为( )。
A. 2 4 2 4
B. 2 4 4 8
C. 4 4 8 8
D. 10 10 58 58
2. [单选题]把用高级语言写的程序转换为可执行的(executable)程序,要经过的过程叫做______。
A. 汇编和解释
B. 编辑和连接
C. 编译和连接
D. 解释和编译
3. [单选题]宏操作GoToRecord 的参数类型是( )。
A. 对象类型
B. 规格名称
C. 工具栏名称
D. 命令
4. [单选题]Access数据库文件(database file)的扩展名是( )。
A. mdb
B. ppt
C. xls
D. doc
5. [单选题]设“int x=2,y=1;”,则表达式(!x|| Y--)的值是( )。
B. 1
C. 2
D. -1
6. [单选题]下列对模板的声明中,正确的是( )。
A. templateclass T1.T2>
B. templateclass T1.class T2>
C. templateclass T1;class T2>
7. [单选题]设有下列程序段: char s[20]="Beijing",*p; p=s; 则执行p=s;语句后,下列叙述正确的是( )。
A. 可以用*p表示s[0]
B. s数组中元素的个数和p所指字符串长度相等
C. s和p都是指针变量
D. 数组s中的内容和指针变量p中的内容相同
8. [单选题]若有下面的说明和定义,则sizeof(struct aa)的值是 struct aa { int rl;double r2;float r3; union uu{char u1[5];long u2[2];}ua; } mya;
A. 30
B. 29
C. 24
D. 22
9. [单选题]有如下程序: #includeiostream> using namespace std; class GA{ public: virtual int f( ){return 1;} }; class GB:public GA{ public: virtual int f( ){return 2;} }; void show(GA g){eoutg.f( );} void display(GA&g){coutg.f( );} int main( ){ GA a;show(A) ;display(A) ; GB b;show(B) ;display(B) ; return 0; } 程序的输出结果是
A. 1211
B. 1112
C. 1212
10. [单选题]下列程序段的执行结果为 ______。 K=0 For I=1 To 3 A=I^I^K Print A; Next I
A. 1 1 1
B. 1 4 9
C. 0 0 0
D. 1 2 3