题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-09-28 01:48:31

[单项选择]单击一次命令按钮,下列程序代码的执行结果为( )。
Private Sub Commandl_Click( )
Dima As Integer,b As Integer,CASInteger
a=2:b=3:c=4
PrintP2(c,b,a)
End Sub
PrivateFunctionPl(X As Integer,y As Intege;z As Integer)
P1=2*x+y+3*Z
End Function
PrivateFunctionP2(X As Integer,y As Integer,z As Integer)
P2=P1(z,x,y)+x
End Function
A. 21
B. 19
C. 17
D. 34

更多"单击一次命令按钮,下列程序代码的执行结果为( )。 Private"的相关试题:

[单项选择]单击一次命令按钮,下列程序代码的执行结果为( )。 Private Sub Commandl_Click( ) Dim a As Integer,b As Integer,C As Integer a=2:b=3:c=4 Print P2(c,b,a) End Sub Private Function P1(x As Integer,y As Integer,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(z,x,y)+x End Function
A. 21
B. 19
C. 17
D. 34
[单项选择]单击命令按钮时,下列程序代码的执行结果为 Private Sub Command1_Click( ) Print MyFunc(24,18) End Sub Public Function MyFunc(m As Integer,n As Integer)As Integer Do While m ◇ n Do While m>n:m=m—n:Loop DO While m<n:n=n-m:Loop Loop My Func=m End Function
A. 2
B. 4
C. 6
D. 8
[单项选择]单击命令按钮时,下列程序代码的执行结果为______。 Private Sub Proe1 (n As Integer,ByVa1 m As Integer) n=n Mod 10 m=m/ 10 End Sub Private Sub Command1_Click( ) Dim x As Integer Dim y As Integer x= 12 y = 34 Call Proe1 (x, y) Print x; y End Sub
A. 12 34
B. 2 34
C. 2 3
D. 12 3
[单项选择]单击命令按钮时,下列程序代码的运行结果为( )。   Private Sub Command1_Click( )     print MyFunc(20,18)   End Sub   Public Function MyFunc (m As Integer,n As Integer)As Integer     Do While m <>n       Do While m > n:m=m - n:Loop       Do While m < n:n=n - m:Loop     Loop     MyFunc=m   End FunCtion
A. 0
B. 2
C. 4
D. 6
[单项选择]单击命令按钮时,下列程序代码的运行结果为  Private Sub Command1_Click( )    print MyFunc(20,18)  End Sub  Public Function MyFunc (m As Integer,n As Integer)As Integer    Do While m <>n      Do While m > n:m=m - n:Loop      Do While m < n:n=n - m:Loop    Loop    MyFunc=m  End FunCtion

A. 0
B. 2
C. 4
D. 6
[单项选择]单击一次命令按钮后,下列程序的执行结果是
Private Sub Command1_Click( )
s=P(1) + P(2) + P(3) + P(4)
Print s
End Sub
Public Function P(N As Integer)
Static Sum
For i=1 To N
Sum=Sum + i
Next i
P=Sum
End Function
A. 15
B. 25
C. 35
D. 45
[单项选择]单击一次命令按钮后,下列程序的执行结果为

  Private Sub Command1_Click( )

    Dim m As Integer,I As Integer,x(10) As Integer

    For I=0 To 4:x(I)=I+1:Next I

    For I=1 TO 2:Call Prioc(x):Next I

    For I=0 TO 3:Print x(I);:Next I

  End Sub

  Private Sub Prioc(a( )As Integer)

    Static I As Integer

    Do

     a(I)=a(I)+a(I+1)

     I=I+1

   Loop While I<2

  End Sub
A. 3 4 7 5
B. 3 5 7 4
C. 1 2 3 4
D. 1 2 3 5
[单项选择]单击一次命令按钮后,下列程序的执行结果为( )。   Private Sub Command1_Click( )     Dim m As Integer,I As Integer,x(10) As Integer     For I=0 To 4:x(I)=I+1:Next I     For I=1 TO 2:Call Prioc(x):Next I     For I=0 TO 3:Print x(I);:Next I   End Sub   Private Sub Prioc(a( )As Integer)     Static I As Integer     Do      a(I)=a(I)+a(I+1)      I=I+1    Loop While I<2   End Sub
A. private
B. 无修饰符
C. public
D. protected
[单项选择]单击一次命令按钮后,下列程序的执行结果是( )。
Private Sub Commandl_Click( )
s=P(1)+P(2)+P(3)+P(4)
Print s
End Sub
Public FunctionP(N As Integer)
Static Sum
Fori=1To N
Sum=Sum+i
Nexti
P=Sum
End Function
A. 15
B. 25
C. 35
D. 45
[单项选择]单击命令按钮时,下列程序代码的执行结果为( )。
Private Function PickMid(xStr As String)As Sting
Dim tempStr As String
Dim strLen As Integer
TempStr=" "
StrLen=Len(xStr)
i=1
Do While i<=strLen/2
 tempStr=tempStr+Mid(xStr,i,1)+Mid(xStr,strLen-i+1,1)
 i=i+1
Loop
PickMid=tempStr
End Function
Private Sub Command1_Click( )
Dim FirstStr As String
FirstStr="abcdef"
Print PickMid(FirstStr)
End Sub
A. abcdef
B. afbecd
C. fedcba
D. defabc
[单项选择]单击一次命令按钮之后,下列程序段的执行结果为( )。
Pubic Sub Proc(a( )As Integer)
 Static i As Integer
 Do
  a(i)=a(i)+a(i+1)
  i=i+1
 Loop While i<2
End Sub
Private Sub Command1_Click( )
 Dim m As Integer,i As Integer,x(10)As Integer
 For i=0 To 4:x(i)=i+1:Next i
 For i=1 To 2:CallProc(x( )):Next i
 For i=0 To 4:Print x(i);Next i
End Sub
A. 3 4 7 5 6
B. 3 5 7 4 5
C. 1 2 3 4 5
D. 1 2 3 5 7
[单项选择]单击一次命令按钮之后,下更程序代码的执行结果为______ 。
Public Sub Proc(a( ) As Integer)
Static i As Integer
Do
a(i) = a(i) + a(i + 1)
i=i+1
Loop While i < 2
End Sub
Private Sub Command1_Cliek( )
Dim m As Integer
Dim i As Integer
Dim x(10) As Integer
For i = 0 To 4
x(i) = i + 1
Next i
For i = 1 To 2
Call Proc (x)
Next i
For i = 0 To 4
Print x(i);
Next i
End Sub
A. 3 4 7 5 6
B. 3 5 7 4 5
C. 1 2 3 4 5
D. 1 2 3 5 7

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码