Option Compare Database
D.im x As Integer
Private Sub Form_Load()
x=3
E.nd Sub
Private Sub Command11_Click()
Static a As Integer
D.im b As Integer
b=x^2
fun1 x,b
fun1 x,b
MsgBox "x="&x
E.nd Sub
Sub fun1(ByRef y As Integer,ByVal z As Integer)
y=y+z
z=y-z
E.nd Sub
[单选题]以下程序的输出结果是( )。 main() { int x=11,y=11; printf("%d,%d/n",X--,--y); }A.11,11B.10,10C.10,11D.11,10
[单选题]下面的程序运行时,单击窗体后,窗体上显示的结果是( )。A.9 8 7 6 3 2B.2 3 6 7 8 9C.9 8 7 6 3D.2 3 6 7 8
[单选题]运行下列程序,输入数据8、9、3、0后,窗体中显示结果是( )。Prirate Sub.Form_click()D.im sum As Integer,m As Integersum=0D.om=inputBox(“输入m”)sum=sum+mLoop Until m=0MsgBox sumE.nd SubA.0B.17C.20D.21
[单选题]下面程序运行时,单击窗体后,窗体上显示的结果是( )。 Private Sub Form_Click Dim I As Integer Dim sum As Long Dim t1 As Long t1=1:sum=0 For 1=1 To 3 t1=t1*I sum=sum+t1 Next I Print sum End SubA.3B.9C.5D.6
[单选题]下面程序运行时,单击窗体后,窗体上显示的结果是( )。 Private Sub Form_Click() Dim I As Integer Dim sum As Long sum=0 For I=10 To 16 If I Mod 3=0 OrI Mod 5=0 Then sum=sum+I End If Next I Print sum End SubA.10B.12C.37D.22
[单选题]以下程序运行后,单击命令按钮,窗体显示的结果是 ______。 Private Function p1(x As Integer,y As Integel,z As Integer) p1=2*x+y+3*z End Function Private Function p2(x As Integer,y As Integer,z As Integer) p2=p1(2,y,x)+x End Function Private SubCommandl_Click() Dim a As Integer
[单选题]下列程序运行时,两次单击窗体后,显示的结果是( )。 Private Sub Form_Click() Dim b As Integer Static c As Integer b=b+2 c=c+2 Print "b=";b;"c=";c End SubA.b=2 c=2 b=2 c=2B.b=2 c=2 b=4 c=4C.b=2 c=2 b=2 c=4D.b=2 c=2 b=4 c=2
[单选题]'下面的程序运行时,单击窗体后,窗体上显示的结果是( )。Private Sub Form_Click(B )D.im a(1 To 5)As Integera(1)= 2: a(2)= 3: a(3)= 1: a(4)= 5: a(5)= 4n = 5F.or i = 1 To n - 1Min = iF.or j = i + 1 To nIf a(j)< a(Min)Then Min = jNext jt = a(i): a(i)= a(Min): a(Min)= tNext iF.or
[单选题](23)下列程序运行时输出的结果是 Option Base 1 Const a=10 Priate Sub Form_Click() Dim x(a) As Integer k=-1 For i=1 To a x(i)=i*k k=(-1)*k Next i For i=1 To 10 Print x(i) Next i End Sub A.1 3 5 7 9 10 B.-1 -3 -5 -7 -9 C.-1 2-3 4-5 6-7 8-9 10 D.1-2 3-4 5-6 7-8 9-10
[单选题]下列程序运行时输出的结果是Option Base 1Private Sub Form_Click()D.im x(10) As Integer,y(5) As IntegerF.or i=1 to 10x(i)=10-i+1NextF.or i= 1 to 5y(i)=x(2*i-1)+x(2*i)NextF.or i= 1 to 5Print y(i)NextE.nd SubA.3 7 11 45 19B.19 15 11 7 3C.1 3 5 7 9D.不确定的值