更多“三极管极间电流满足I<sub>C</sub>=βI<sub>B<”相关问题
  • 第1题:

    有以下程序: Sub subP(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 subPa() For i=1 To 4 Print a(i) Next i End Sub 运行上面的程序,单击命令按钮,输出结果为( )

    A.2 4 6 8

    B.5 6 7 8

    C.10 12 14 16

    D.出错


    正确答案:A

  • 第2题:

    下面程序段的运行结果是【 】。

    Option Base 1

    Private Sub Swap (a() As Integ

    For I=1 to 10\2

    t=a(I)

    a(I)=a(10-I+1)

    a(10-I+1)=t

    Next I

    End Sub

    Private Sub Form_Click()

    Dim x(10) As Integer

    For I=1 to 10

    x(I)=I*2

    Next I

    Swap x()

    For I=1 to 10

    Print x(I)

    Next I

    End Sub


    正确答案:20 18 16 14 12 10 8 6 4 2
    20 18 16 14 12 10 8 6 4 2 解析:本题考查考生数组虚实结合的问题,在该事件过程中,定义并生成了x数组,该数组共10个元素,分别是 2 4 6 8 10 12 14 16 18 20,接着使用了不带Call的调用语句,实际参数和虚拟参数都是数组,是地址传送,在过程中访问的数组就是事件过程中的x数组。在该过程中,将数组的第一个元素和最后一个元素交换位置,依此类推,返回事件过程后输出交换后的数组全部元素。

  • 第3题:

    以下能够正确计算n!的程序是

    A.Private Sub Command1_Chck( ) n=5:x=1 Do x=x*i i=i+1 Loop While i<n Print x End Sub

    B.Private Sub Command1_Click( ) n=5:x=1:i=l Do x=x*i i=i+1 Loop While i<n Print x End Sub

    C.Private Sub Command1_Click( ) n=5:x=1:i=l Do x=x*i i=i+1 Loop While i<=n Print x End Sub

    D.Private Sub Command1_Click( ) n=5:x=1:i=l Dox=x*i i=i+1 Loop While i>n Print x End Sub


    正确答案:C
    解析:A中i一开始末被赋值,默认为0;B项中由于“in”的条件使得Do循环比应有循环次数少循环一次;选项D由于“i>n”这一条件,使得控制语句只能循环一次。

  • 第4题:

    以下程序的运行结果是( ) #define MAX 10 int a[MAX],i; main() { printf("\n");sub1();sub3(A) ,sub2(),sub3(A) ; } sub2() { int a[MAX],i,max; max=5; for(i=0;i<max;i++)a[i]=i; } sub1() {for(i=0;i<MAX;i++)a[i]=i+i; } sub3(int a[]) { int i; for(i=0;i<MAX,i++)printf("%d",a[i]); printf("\n"); }

    A.0 2 4 6 8 10 12 14 16 18 0 1 2 3 4

    B.0 1 2 3 4 0 2 4 6 8 10 12 14 16 18

    C.0 1 2 3 4 5 6 7 8 9 0 1 2 3 4

    D.0 2 4 6 8 10 12 14 16 18 0 2 4 6 8 10 12 14 16 18


    正确答案:D

  • 第5题:

    以下能够正确计算n! 的程序是( )。

    A.Private Sub Command1_Click( ) n=5:x=l Do x=x*i i=i+1 Loop While i < n Print x End Sub

    B.Private Sub Command1_Click( ) n=5:x=1:i=1 Do x=x*i i=i+1 Loop While i < n Print x End Sub

    C.Private Sub Command1_Cliek( ) n:5:x=1:i=1 Do x=x* i i:i+1 Loop While i < = n Print x End Sub

    D.Private Sub Command1_Cliek( ) n=5:x:1:i=1 Do x=x*i i=j+1 Loop While i > n Print x End Sub


    正确答案:C
    解析:本题考查DoLoop语句的用法。首先是执行循环体,再确定循环执行的条件,这里满足执行循环的条件应该是i=n,选项A和B的循环条件都是in,少了i=n的一次循环,实际上只执行了n-1次;而选项D则从i>n时才开始执行,不合题意。

  • 第6题:

    下面程序的输出结果是【 】。

    Private Sub Form_Click()

    i=0

    Do Until 0

    i=i+1

    if i>10 then Exit Do

    Loop

    Print i

    End Sub


    正确答案:11
    11 解析:本题主要考查Do循环语句。循环条件Do Until 0可得知这是一个无限循环,要跳出此循环,只有在循环体里面使用相关的语句。这里用的是Exit Do,从程序上看出,跳出循环的条件是i>10,而i是从0开始,每次循环加1。所以,跳出循环时i的值应该为11。

  • 第7题:

    以下能够正确计算1+2+3+…+10的程序是

    A.Private Sub Command1_Click() Sum=0 ForI=1 To 10 Sum=Sum+I Next I Print Sum End Sub

    B.Private Sub Command1_Click() Sum=0,I=1 Do While I<=10 Sum=Sum+I I=I+1 Print Sum End Sub

    C.Private Sub Command1_Click() Sum=0: I=1 Do Sum=Sum+I I=I+1 Loop While I<10 Print Sum End Sub

    D.Private Sub Command1_Click() Sum=0: I=1 Do Sum=Sum+I I=I+1 Loop Until I<10 Print Sum End Sub


    正确答案:A
    解析:本题考查For循环与 Do循环控制语句。A选项进行10次循环,分别将1之10累加给Sum,故正确。选项B缺少Loop关键词,否则也是正确的。选项C与D由于受条件“lclo”限制,Do循环只能进行一次。

  • 第8题:

    有程序如下: Sub subP(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 subP a() For i=1 To 4 Print a(i) Next i End Sub运行上面程序,单击命令按钮,输出结果为______ 。

    A. 2 4 6 8

    B.5 2 2 2

    C.10 12 14 16

    D.出错


    正确答案:A

  • 第9题:

    编写如下事件过程: Option Base 1 Private Sub Form Click() Dim x1()As Integer Dim i As Integer Dim s As Integer ReDim x1(3) For i = 1 To UBound(x1) x1(i)=i + 1 Next i Call sub1(x1) For i = 1 To UBound(x1) s = s + x1(i) Next i Print s End Sub Private Sub sub1(n()As Integer) Dim i As Integer ReDim Preserve n(5) For i = 3 To 5 n(i)=n(i-1)*2 Next i End Sub 程序运行后,单击窗体,则窗体上显示的内容是

    A.6

    B.12

    C.24

    D.47


    正确答案:D
    解析:在主过程中,数组x1的下标最大值为3,赋初值分别为2、3、4,通过实参和形参的调用,数组x1的值传给了数组n。在子过程中,数组n的下标最大值被重新定义为5,下标3~5的值计算的结果分别为6、12、24。在主过程中,将数组x1的各值相加得:2+3+6+12+24=47。

  • 第10题:

    以下能够正确计算n!的程序是( )。

    A.Pfivate Sub Commgld1_LClick() n=5:x=1 Do x=x*1 i=i+1 Loop Whilei<n

    B.Private Sub Command1_Click() n=5:x=1:i=1 Do x=x*1 i=i+1 Loop Whilei<n Print x End Sub

    C.Pfivate Sub Command1_ C1ick() n=5:x=1:i=1 Do X=X*1 i=i+1 Loop While i<=n

    D.Private Sub Command1_C1ick() n=5:x=1:i=1 Do X=X*1 i=i+1 Loop While i>n Print x End Sub


    正确答案:C
    解析:本题考查Do While语句的用法。首先我们知道n!=1×2×3×……×(n-1)×n,由于是累乘,因此x和i的初值都必须为1;其次就是循环执行条件的确定,由于使用的是 While型循环,表示在满足条件时执行循环体中的代码,这里满足执行循环的条件应该是 i=n。选项A和B的循环条件都是in,少了 i=n的一次循环,实际上只执行了n-1次:而选项D则从i>n时才开始执行,不合题意;同时,选项B没有指定i的初值,系统会默认i =0,这也不合题意。本题正确答案为选项C。

  • 第11题:

    阅读程序 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


    正确答案:D
    解析:VBA中,数组可以作为过程的参数进行定义和使用。主要有两种形式:一是数组元素作为过程参数使用,与普通变量作为参数使用相同,同样存在传值与传址两种调用情况;二是数组名作为过程参数使用,形式参数必须定义为没有下标的数组,实际参数则为数组名,而且这种数据传递采用传址的“双向”作用形式。本题就是数组作为过程参数的第二种使用形式,考虑到“双向”作用效果,正确答案为D。

  • 第12题:

    单选题
    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?()
    A

     0

    B

     1

    C

     2

    D

     Compilation fails.


    正确答案: B
    解析: This code is perfectly legal and the answer is C. 

  • 第13题:

    阅读程序: Sub p( b () As Integer)For i =1To 4 b(i) = 2(iNext 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 call p (a) For i=1 To 4 Print a(i) Next iEnd Sub运行上面的程序,单击命令按钮,输出结果为。


    正确答案:2 4 6 8
    【解析】本题综合考查Sub过程的建立与调用以及数组的赋值。P过程为参数b()赋值,赋值方法为b()中的元素值等于其下标的2倍。在事件过程中,数组a(1 to 4)先被逐一赋值,然后以传地址的方式被p过程调用。在调用中,a(i)被重新按照p过程的赋值方式(即元素值等于对应下标值的2倍)赋值。由于是以传地址的方式传送a(1 to 4),故在调用完p过程后,a(1 to 4),故在调用完p过程后,a(1 to 4)中的元素值将保留,故空白处填:2 4 6 8。

  • 第14题:

    下面程序的输出结果是【 】。

    Private Sub Form_Click()

    i=0

    Do Until 0

    i=i+1

    if i>10 then Exit Do

    Loop

    Print i

    End Sub


    正确答案:11
    11 解析:这题主要考察的是Do循环语句。看循环条件Do Until 0,得到这是一个无限循环,要跳出此循环,只有在循环体里面使用相关的语句。这里用的是Exit Do
    从程序上看出,跳出循环的条件足i>10,而i是从0开始,每次循环加1。所以,跳出循环时i的值应该为 11。

  • 第15题:

    以下能够正确计算n!的程序是

    A.Private Sub Command1 Click() n=5:x=1 Do x=x * I I=I + 1 Loop While I < n Print x End Sub

    B.Private Sub Command1_Click() n=5:X=1:I=1 Do X=X*I I=I + 1 Loop While I <n Print x End Sub

    C.Private Sub Command1_Click() n=5:X=1:I=1 Do X=X * I I=I + 1 Loop While I<=n Print X End Sub

    D.Private Sub Command1_Click() n=5:X=1:I=1 Do x=x * I I=I + 1 Loop While I>n Print X End Sub


    正确答案:C
    解析:n!=1×2×3×…×(n-1)×n,由于是累乘,因此x和i的初值都必须为1;其次就是循环执行条件的确定,由于使用的是While型循环,表示在满足条件时执行循环体中的代码,这里满足执行循环的条件应该是i=n。

  • 第16题:

    设有如下程序: Private Sub search(a()As Variant,ByVal key As Variant,index%) Dim I% For I = Lbound(a)To Ubound(A)If key=a(I)Then index=I Exit Sub End If Next I index=-1 End Sub Private Sub Form_Load() Show Dim b()As Variant Dim n As Integer b=Array(21,64,92,15,72,38,45,72) Call search(b, 45, n) Print n End Sub 程序运行后,输出的结果是

    A.2

    B.6

    C.10

    D.12


    正确答案:B
    解析:本程序的功能是:查寻给定数字45在数组b中的位置n。用Array函数给数组b的各元素赋初值,其中数组变量名a应是Variant型的。用数组作为过程的形参时,应在数组名的后面加上一对圆括号(如数组a());用数组作为调用过程的实参时,数组名的后面去掉一对圆括号(如数组b)。用类型说明符%来标识index和I为整型变量。Lbound(a)和Ubound(a)函数分别返回数组的下界和上界,下界值为0。在于程序search中,当key=a(I)条件(即45=a(6))成立时,变量index记录下数组下标值6,然后中断循环,退出于程序search,index反传送给变量n,最后打印出6。

  • 第17题:

    下列程序的输出结果是【 】。

    Private Sub Command l Click()

    Dim a(1 TO 20)

    Dim i

    For i=1 TO 20

    a(i)=i

    Next i

    For Each i In a()

    a(i)=20

    Next i

    Print a(2) End Sub


    正确答案:20
    20 解析:本题考查For Next…Each语句的用法,For Next…Each语句是针对数组和集合中的每一个元素进行…次操作的语句组合。本题定义了一个数组,然后利用For循环将1~20赋给数组元素,又利用For Each Next语句将数组的每一个元素定义为20,故输出结果为20。

  • 第18题:

    在窗体上画一个名称为CoilTlilandl的命令按钮,然后编写如下事件过程: Private Sub command1 Click() Dim m As Integer, i As Integer, x(3)As Integer For i=0 To 3:x(i)=i:Next i For i = 1 To 2: Call sub1(x,i):Next i For i = 0 To 3: Print x(i);: Next i End Sub Private Sub sub1(a()As Integer,k As Integer) Dim i As Integer Do a(k)=a(k)+a(k+1) j = j + 1 Loop While j < 2 End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是

    A.0 3 7 5

    B.0 1 2 3

    C.3 2 4 5

    D.0 5 8 3


    正确答案:D
    解析:数组也可以作为函数或者过程的参数,使用方法是直接使用数组名加括号,也可以直接使用数组名,采用sub1(x)和sub1(x())的调用形式都正确。变量i的作用只控制循环次数。

  • 第19题:

    编写如下事件过程: Private sub sub1 (ByVal x1 As String, y1 As String) Dim xt As String Dim i As Integer i = Len(x1) Do While i>= 1 xt = xt + Mid(x1, i, 1) i=i-1 Loop y1 = xt End Sub Private Sub Form. Click() Dim s1 As String, s2 As String s1= "teacher" sub1 s1, s2 Print s2 End Sub 程序运行后,单击窗体,则窗体上显示的内容是

    A.rehcaet

    B.tahreee

    C.themee

    D.eerthea


    正确答案:A
    解析:可以看出,Sub1(ByValx1AsString,y1AsString)的作用是将参数x1的字符逆序处理,然后赋给y1,而y1是传址引用的,可以直接返回处理结果。

  • 第20题:

    在窗体上画一个命令按钮,然后编写如下事件过程: Sub BTC(old Copy( ) As Integer,new Copy( ) As Integer) Dim i AS Integer For i=LBound(oldCopy( ))To UBound(oldCopy( )) newCopy(i)=oldCopy(i) Next i End Sub Private Sub Command1 _ Click( ) Dimm(10) As Integer,n(10)As Integer For i=1 To 10 m(i) =i*i Next i Call BTC(m,n) Print n(5) End Sub 程序运行后,单击命令按钮输出结果为

    A.0

    B.2

    C.10

    D.25


    正确答案:D
    解析:在此题中定义了一个数据拷贝函数,用数组来保存数据,在主调过程中,先用For…Next循环语句给m()赋给,然后调用BTC函数,将m()中的数据赋给n(),最后输出n(5)。在数据拷贝函数中,用了函数LBound(oldCopy())和UBound(old-Copy())分别获得数组的下界和上界,控制循环次数。用newCopy(i)=oldCopy(i)赋值语句,将m数组中的数据赋给n数组。因为m(5)=25,数组n与数组m等价,所以n(5)也是25。

  • 第21题:

    以下能够正确计算n!的程序是______。

    A.Private Sub Commeadl_Click() n=5: x=1 Do x=x*i i=i+1 Loop While i<n Print x End Sub

    B.Private Sub Command1_Click() n=5: x=1: i=1 Do x=x*i i=i+1 Loop While i<n Print x End Sub

    C.Private Sub Command1_Click() n=5: x=1: i=1 Do x=x*i i=i+1 Loop Whilei<=n Print x End Sub

    D.Private Sub Commsndl_Click() n=5: x=1: i=1 Do x=x*i i=i+1 Loop While i>n Print x End Sub


    正确答案:C
    解析:选项A中变量i没有赋初值操作,其一直保持0值,所以始终为0;选项B中循环条件“i>n”错误,计算一次后就退出循环,导致计算结果不正确;选项D的计算过程中,第1次计算时“1>4”的条件不处理,退出Do循环,其结果为1;选项C的计算结果为5!。

  • 第22题:

    以下能够正确计算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


    正确答案:C
    解析:本题考查DoWhile语句的用法。首先我们知道n!=1×2×3×……×(n-1)×n,由于是累乘,因此x和i的初值都必须为l;其次就是循环执行条件的确定,由于使用的是While型循环,表示在满足条件时执行循环体中的代码,这里满足执行循环的条件应该是i=n。选项A和B的循环条件都是in,少了i=n的一次循环,实际上只执行了n-1次;而选项D则从i>n时才开始执行,不合题意;同时,选项B没有指定i的初值,系统会默认i;0,这也不合题意。本题正确答案为选项C。

  • 第23题:

    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?()  

    • A、 0
    • B、 1
    • C、 2
    • D、 Compilation fails.

    正确答案:C

  • 第24题:

    单选题
    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 (straing args) (  sub sub = new sub (“Hello”);   system.out. PrintIn(sub.i);  )   )   What is the result?()
    A

     Compilation will fail.

    B

     Compilation will succeed and the program will print “0”

    C

     Compilation will succeed and the program will print “1”

    D

     Compilation will succeed and the program will print “2”


    正确答案: D
    解析: 暂无解析