三极管3DG4的PCM=300mW,IC=10mA,管子的工作电压UCE等于()V。
第1题:
在窗体上有一个命令按钮Commandl,编写事件代码如下:
Private SuB commandl_Click()
Dim a(10),p(3)As Integer
k=5
For i=1 To 10
a(i)=i+i
Next i
For i=1 To 3
P(i)=a(i*i)
Next i
For i=1 To 3
k =k+p(i)*2
Next i
MsgBox k
End SuB
打开窗体运行后,单击命令按钮,消息框中输出的结果是【 】。
第2题:
在窗体画一个命令按钮,然后编写如下事件过程:
Private Sub Command1_CIick()
Dim a(1 To 10)
Dim p(1 To 3)
k=5
For i =1 To 10
a(i)=i
Next i
For i=1 To 3
p(i)=a(i*i)
Next i
For i=1 To 3
k=k+p(i)*2
Next i
Print k
End Sub
程序运行后,单击命令按钮,输出结果是【 】。
第3题:
单击一次命令按钮后,下列程序的执行结果是 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
第4题:
有如下函致: Function fact(x As Integer)As Long Dim p As Long,i As Integer p=1 For i=1 To x p=p*1 Next fact=p End Function 调用它的事件过程如下: Private Sub Command1_Click() i=Val(Inputbox("请输入数据")) a=fact((i)) Print a End Sub 若输入数据5,则运行结果为
A.120
B.60
C.80
D.100
第5题:
执行下面的程序,消息框的输出结果是 【 】。
Option Basel
Private Sub Commandl Click()
Dim a(10),P(3)As Integer
k=5
For i=1 To 10
a(i)=i
Next i
For i=1 To 3
P(i)=a(i*i)
Next i
For i=1 To 3
k=k+p(i)*2
Next i
MsgBox k
End sub
第6题:
设程序中有如下数组定义和过程调用语句:
Dim a(10) as integer
……
Call p(a)
如下过程定义中,正确的是
A)Private Sub p(a as integer)
B)Private Sub p(a() as integer)
C)Private Sub p(a(10) as integer)
D)Private Sub p(a(n) as integer)
第7题:
在窗体上添加如下命令按纽,然后编写如下事件过程: Private Sub Command1_Click() Dim a(10)As Integer Dim p(3)As Integer k= 5 For i = 1 To 10 a(i) = i Next i For i = 1 To 3 p(i) = a(i * i) Next i For i = 1 To 3 k = k + p(i) * 2 Next i Print k End Sub该过程的运行结果为______。
A.35
B.33
C.31
D.29
第8题:
以下能够正确计算n!的程序是( )。
A.Private Sub Commandl_C1ick()
B.hiVate Sub Commandl_C1ick() n=5:x=1 n=5:x=1:i=1 DO DO X=x*1 X=X*1 i=i+1 i=i+1 Loop while i<n Loop While<n Print x Ptinte x End Sub End Sub
C.Private Sub Commandl_Click ()
D.Pdvate Sub Commandl C1ick() n=5:X=1:i=1 n=5=:x=1:i=1 DO DO X=X*1 X=X*1 i=i+1 i=i+1 Loop While i>n Print x Print x End Sub End Sub
第9题:
阅读程序 SUB P(B( ) AS INTEGER) FOR I=1 TO 4 B(I) =2*I NEXT I END SUB PRIVATE SUB COMMAND1_CLICK( ) DIM A( 1 TO 4) AS INTEGER A(1)=5 A(2) =6 A(3) =7 A(4) =8 P A( ) FOR I = 1 TO 4 MSGBOX A(I) NEXT I END SUB 运行上面的程序,单击命令按钮COMMAND1后,消息框4次输出的内容分别是( )。
A.出错
B.10, 12, 14, 16
C.5, 6, 7, 8
D.2, 4, 6, 8
第10题:
class Super { public int i = 0; public Super(String text) { i = 1; } } public class Sub extends Super { public Sub(String text) { i = 2; } public static void main(String args[]) { Sub sub = new Sub(“Hello”); System.out.println(sub.i); } } What is the result?()
第11题:
<p>I<sub>2</sub>=I<sub>3</sub></p>
<p>I<sub>2</sub>=4I<sub>3</sub></p>
<p>I<sub>2</sub>=2I<sub>3</sub></p>
<p>I<sub>3</sub>=4I<sub>2</sub></p>
第12题:
<p>M<sub>0</sub></p>
<p>M<sub>1</sub></p>
<p>M<sub>2</sub></p>
<p>M<sub>3</sub></p>
第13题:
设程序中有如下数组定义和过程调用语句: Dim a(10)As Integer … Call D(a) 如下过程定义巾,正确的是( )。
A.Private Sub p(a As Integer)
B.Private Sub p(a( )As Integer)
C.Private Sub p(a(10)As Integer)
D.Private Sub p(a(n)As Integer)
第14题:
在窗体中添加一个名称为Com1的命令按钮,然后编写如下程序:
Private Sub s(ByVal p As Integer)
p=p*2
End Sub
Private Sub Com1_Click()
Dim i As Integer
i=3
Call s(i)
If i>4 Then i=i^2
End sub
窗体打开运行后,单击命令按钮,则消息框的输出结果为( )。
第15题:
在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Commandl_Click() Dim m As Integer, n As Integer, p As Integer m=3: n=5: p=0 Call Y(m, n, p) Print Str(p) End Sub Sub Y(ByVal i As Integer, ByVal j As Integer, k As Integer) k=i+j End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )
A.4
B.6
C.8
D.10
第16题:
在窗体中添加一个名称为Command1的命令按钮,然后编写如下程序:
Private Sub s(ByVal p As Integer)
p=p*2
End Sub
Private Sub Command1_click()
Dim i As Integer
i=3
Call s(i)
If i>4 Then i=i^2
MsgBox i
End Sub
窗体打开运行后,单击命令按钮,则消息框的输出结果为【 】。
第17题:
单击一次命令按钮之后,下列程序代码的执行结果为 private Sub Command1_Click() S=P(1) +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 1 P=Sum End Function
A.20
B.35
C.115
D.135
第18题:
执行下面的程序,消息框的输出结果是【 】。
Option Base1
Private Sub Command1_Click( )
Dim a(10),P(3)As Integer
k=5
For i=1 To 10
a(i)=i
Next i
For i=1 To 3
P(i)=a(i*i)
Next i
For i=1 To 3
k=k+p(i)*2
Next i
MsgBox k
End sub
第19题:
若有如下程序: sub(p,n) int(*p)[3],n; { int i; for(i=0;i<=n;i++) printf("%d",*(*(p+i)+n)); } main() {int s[3][3]={1,2,3,4,5,6,7,8,9}; sub(s,2); } 则程序运行后的输出结果是( )
A.3 6 9
B.2 4 8
C.4 5 6
D.7 8 9
第20题:
在窗体中添加一个命令按钮,编写如下程序: Private Sub Sub1(p,m,n) p=p+1:m=m+1:n=n+1 Print "sub1:";p;m;n End Sub Private Sub Command1_Click() a1=1:b=2:c1=3 Call Sub1(a,b1+3,c1) Print"Main:";a1;b1;c1 End Sub 程序运行后,输出结果为
A.Sub: 2 6 4 Main: 2 6 4
B.Sub: 2 6 4 Main: 2 6 4
C.Sub: 2 6 4 Main: 1 2 3
D.Sub: 2 6 4 Main: 2 2 3
第21题:
在窗体上画一个命令按钮,然后编写如下事件过程:
Private Sub Commandl_Click()
Dim a (1 To 10)
Dim p(1 To 3)
k=5
For i=1 To 10
a(i)=i
Nexti
Fori=1 To 3
p(i)=a(i*i)
Next i
For i=1 To 3
k=k+p(i)*2
Next i
Print k
End Sub
程序运行后,单击命令按钮,输出结果是【 】。
第22题:
0
1
2
Compilation fails.
第23题:
Compilation will fail.
Compilation will succeed and the program will print “0”
Compilation will succeed and the program will print “1”
Compilation will succeed and the program will print “2”