123456
12
56
567890
第1题:
执行下面程序,第一行输出结果是【 】,第二行输出结果是47。
Option Explicit
Private Sub Form_Click( )
Dim A As Integer
A=2
Call Sub1 (A) End Sub
Private Sub1 (x As Integer)
x=x*2+1
If x<10 Then
Call Sub1 (x)
End If
x=x*2+1
Print x
End Sub
第2题:
下列程序的输出结果为( )。 #include<iostream.h> void main() { int x; int &y=x;//变量引用 y=99; cout<<"x="<<x<<end1; }
A.x=99
B.x=9
C.x=0
D.异常
第3题:
以下程序的输出结果是 ______。 x=2^-2 Print x End
A.4
B.0.25
C.4
D.程序错误
第4题:
执行以下程序后的输出结果为( )。#include<iostream. b>class Sample{ int x, y; public: Sample() { x=y=0;} Sample(int a, int b) {x=a; y=b; } void disp () { cout<<"x="<<x<<"y="<<y<<end1; }};void main(){ Sample s(2,3), *p=&s; p->disp();}
A.x=1, y=3
B.x=2, y=4
C.x=3, y=2
D.x=2, y=3
第5题:
单击命令按钮时,下列程序的执行结果是 Private Sub Commandl_Click( ) BT 4 End Sub PriVate Sub BT(x As Integer) X=X * 2 + 1 If x <6 Then Call BT(x) End If X=x * 2 Print x; End Sub
A.15
B.16
C.17
D.18
第6题:
有程序:CHARACTER*6SS=‘ABCDEF’CALLSS(S)ENDSUBROUTINESS(S1)CHARACTERS1*3WRITE(*,*)S1END此程序执行后的输出结果为:()
第7题:
有程序:F1(x)=2.0/(1.0+x)F2(Y)=F1(Y)*Y+1.0A=F1(1.0+F2(1.0)WRITE(*,10)A10FORMAT(1x,E8.2)END此程序执行后的输出结果为:()
第8题:
4.0
3.0
11.0
10.0
第9题:
ABC
BCD
CDE
DEF
第10题:
-4
5
9
4
第11题:
123456
12
56
1234567890
第12题:
3.00
3.0
3.00E+00
30E+01
第13题:
执行以下程序后的输出结果为 ( )。#include<iostream>Using namespace std;void fun(int x, int y, int *cp, int *dp) {*cp=x+ y; 2*dp=x- y;}void maia() {int a, b, c, d; a=30; b=50; fun(a, b, &c, &d); cout<<c<<','<,d<<end1;}
A.50, 30
B.30, 50
C.80, 20
D.80, 20
第14题:
单击窗体时,下列程序代码的执行结果为______ 。 Private Sub Test (x As Integer) x=x*2+1 If x < 6 Then Call Test(x) End If x-x*2+1 Print x; End Sub Private Sub Command1_ Click () Test 2 End Sub
A.23 47
B.5 11
C.10 22
D.23 29
第15题:
执行下面这段程序后,单击命令按钮,窗体中输出结果是 ______。 Private Sub Command1_Click() a=1 : b=4 : c = 9 : d = 5 If a < b Then If c<d Then x=True Else If a<c Then x=False Else x=True End If End If End If Print Val(x) End Sub
A.True
B.False
C.0
D.1
第16题:
窗体上没有任何控件,编写下列程序: Option Base 1 Private Sub Form_KeyPress(KeyAscii As Integer) a = Array(5, 2, 7, 6, 9) x = a(1) y = 1 If KeyAscii = 13 Then For i = 2 To 5 If a(i)>m1 Then x = a (i) y= i End If Next i End If Print x; y End Sub 执行程序后,按下回车键后输出的结果为
A.5 1
B.9 5
C.2 2
D.7 3
第17题:
执行下面程序,第一行输出结果是 [ ] ,第二行输出结果是 [ ] 。
Option Explicit
Private Sub Form_Click()
Dim A As Integer
A=2
Call Sub1(A)End Sub
Private Sub1(x As Integer)
x=x*2+1
If x<10 Then
Call Sub1(x)
End If
x=x*2+1
Print x
End Sub
第18题:
有程序:DIMENSIONx(3,3)READ(*,*)xCALLSSl(x(1,2))ENDSUBROUTINESSl(x)DIMENSIONx(3)WRITE(*,*)x(2)END当输入1、2、3、4、5、6、7、8、9时,此程序执行后的输出结果为:()
第19题:
有程序:READ(*,100)A100FORMAT(3x,F6.2)WRITE(*,200)A200FORMAT(1x,F8.2)END当执行此程序时,从键盘输入1234567890↙,则程序的运行结果是:()
第20题:
2
3
4
16
第21题:
.6180
6.180E-01
.0618E+01
.6180E+00
第22题:
3
4
5
6
第23题:
123456
12
56
567890
第24题:
4567.89
1234.56
******
1234.5