一输入电阻Ri=500MΩ,零电流I0=10-9A的DC-DVM,测量内阻r=10kΩ的U=1V电压源,求由Ri和I0引起的误差极限r。
第1题:
下面程序的输出结果是【 】。
Private Sub Form_Click()
i=0
Do Until 0
i=i+1
if i>10 then Exit Do
Loop
Print i
End Sub
第2题:
下面程序的执行结果是______。 #define MAX 10 nt a[MAX],i; main() { printf("\n"); sub1();sub3(A) ; sub2();sub3(A) ; } sub1() {for(i=0;i<1MAX;i++) a[i]-i+i; } sub2() {int a[MAX],i,max; max=5; for(i=0;i<max;i++) a[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
第3题:
下面程序的输出结果是【 】。
Private Sub Form_Click()
i=0
Do Until 0
i=i+1
if i>10 then Exit Do
Loop
Print i
End Sub
第4题:
在窗体上画一个命令按钮,然后编写下列程序: Private Sub Command1 click( ) Dim a As Single,b As Single a=6:b=2 RC a,b Print a,b End Sub Sub RC(x As Single,y As Single) i=x x=i/y y=i Mod y End Sub
A.4 3
B.1 1
C.3 0
D.2 6
第5题:
设计一个计时程序。该程序用户界面如图所示,由一个文本框(Text1)、两个按钮:命令按钮1(Command1)、命令按钮2(Command2)组成。程序运行后,单击开始按钮,则开始计时,文本框中显示秒数,单击停止按钮,则计时停止。单击窗口则退出。请在【 】、【 】和【 】处填入适当的内容,将程序补充完整。
Option Explicit
Dim i
Private Sub Command1_Click()
i=0
Timer1.Interval=1000
TimerEnabled=True
End Sub
Private Sub Command2_Click()
TimerEnabled=False
End Sub
Private Sub Form_Click()
【 】Me
End Sub
Private Sub Form_Load()
TimerEnabled=False
TextText=0
End Sub
Private Sub Timer1_【 】()
i=i+1
TextText=【 】
End Sub
第6题:
以下能够正确计算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
第7题:
单击命令按钮后,下列程序代码的执行结果是______。
Public Sub fun (a As Integer, b As Integer, c As Integer)
Do
a=b+ c
n=n+1
Loop While n > 3
End Sub
Private Sub command1_ click()
Dim m As Integer, n As Integer, i As Integer
For i = 0 To 2: m = n + 1: Next i
For i = 1 To 2: Call fun (m, n, i): Next i
For i = 0 To 3
Print m;
Next i
End Sub
第8题:
编写如下事件过程: 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
第9题:
以下能够正确计算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
第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题:
0
1
2
Compilation fails.
第12题:
<p>U<sub>95</sub>= 1%,v<sub>eff</sub> =9 </p>
<p>U<sub>r</sub>= 1%,k=2 </p>
<p>u<sub>C</sub>=0. 5% </p>
<p>u<sub>C</sub>=±0 5%.k=1 </p>
第13题:
以下程序的运行结果是( ) #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
第14题:
设有如下程序: Dim a()As Integer Private Sub Command1_Click() n=-5:m=6 ReDim a(n To m) For i=LBound(a,1)To UBound(a,1) a(i)=i Next i Print a(LBound(a,1));a(UBound(a,1)) End Sub 程序运行后,单击命令按钮,则输出结果是 ______。
A.0 0
B.-5 0
C.-5 6
D.0 6
第15题:
单击一次命令按钮之后,窗体中的输出结果为______。 Private Sub Command1_ Click() Dim a As Integer, b As Integer For i = 1 To 6 a=i*i+i Next i Call writein(a,B)Print a, b End Sub Sub writein(a, ByValB)b = 1 For i = 1 To 6 a=b* 4 b = b + 1 Next i End Sub
A.24 6
B.24 0
C.12 6
D.12 0
第16题:
在窗体上画一个名称为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
第17题:
单击一次命令按钮之后,下更程序代码的执行结果为______ 。 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
第18题:
编写如下事件过程: 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
第19题:
在窗体上画一个命令按钮,然后编写如下事件过程: 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
第20题:
以下能够正确计算1+2+3+…+10的程序是
A.Private sub Command1_Click( ) sum=0 For 1=1 To 10 Sum=sum+1, Next I Print Sum End Sub
B.Private sub Command1_Click( ) Sum=0,I=1 Do While l<=10 Sum=Sum+1 I=I+1 Print Sum End Sub
C.Private Sub command1_click( ) Sum=0:I=1 Do Sum=Sum+1 I=I+1 Loop While I<10 Print Sum End Sub
D.Private Sub command1_Click( ) Sum=0:I=1 Do Sum=Sum+1 l=I+1 Loop Until I<10 Print Sum End Sub
第21题:
下列程序运行后的输出结果是______。
Private Sub f(k,s)
s=1
For j=1 To k
s=s*j
Next
End Sub
Private Sub Command1_Click()
Sum=0
For i=1 To 3
Call f(i,s)
Sum=Sum+s
Next
Print Sum
End Sub
第22题:
当一台DC-DVM的输入电阻为Ri,电压信号源内阻为Rs,由输入零电流I0引起的误差电压是()
第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”