两相干光的光强分别为I1和2I1,当他们的光强都减半时,干涉条纹的可见度()
第1题:
如下图所示的两个窗体:
要使其中第一个窗体中的第一个命令按钮来控制显示第二个窗体,第二个命令按钮用来结束程序的运行(两个按钮名称为Command1和Command2)。则以下选项中,对这两个命令按钮编写的事件过程正确的是
A.Private Sub Command1 Click() Form2.Show 1 End Sub Private Sub Command2_Click()End End Sub
B.Private Sub Command1_Click() Show 1 End Sub Private Sub Conunand2_Click() End End Sub
C.Private Sub Conmmand1_Click() Show 1 End Sub Private Sub Command2_Click() End End Sub
D.Private Sub Command1_Click()Show 1, Form2 End SubPrivate Sub Command2_Click() End End Sub
第2题:
有如下程序: Private Sub Commandl_Click( ) Dim i As Integer For i=1 To 2 DS Next i End Sub Sub DS( ) Dim x As Integer,m As String Static y,n X=X + 1 y=y + 1 m=m &"*”:n=n&"#" Print x,y,m,n End Sub 程序运行后,输出的结果是
A.1 1 * #
B.1 1 * #
C.1 1 * # 1 1 * # 1 2 * #
D.1 1 * # 1 1 * ## 1 2 * ##
第3题:
下面程序的执行结果是______。 #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
第4题:
以下能够正确计算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
第5题:
有如下事件过程: Private Sub Commaild1_Click( ) Dim i As Integer For i =1 To 2 DC Next i End Sub Sub DC( ) Dim x As Integer,m As String Static y,n x=x + 1 y=y + 1 m=m&"*":n=n &"#" Print x,y,m,n End Sub 程序运行后,输出的结果是
A.1 1 * # 1 1 * #
B.1 1 * # 1 2 * #
C.1 1 * # 1 1 * ##
D.1 1 * # 1 2 * ##
第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题:
有如下程序。 Private Sub Commandl_Click() Dim a As Single Dim b As Single a=5:b=4 Call Sub1 ( a,B)End Sub Sub Subl(x As Single, y As Single) t=x x=t\y y = t Mod y End Sub 在调用运行上述程序后,a和b的值分别为
A.0 0
B.1 1
C.2
D.1 2
第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.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
第10题:
以下能够正确计算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
第11题:
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?()
第12题:
K<sub>t</sub>+1=I<sub>t</sub>-(1-δ)K<sub>t</sub>
K<sub>t</sub>+1=It+(1-δ)K<sub>t</sub>
K<sub>t</sub>+1=I<sub>t</sub>+(1+δ)K<sub>t</sub>
K<sub>t</sub>+1=I<sub>t</sub>-(1+δ)K<sub>t</sub>
第13题:
在窗体上画两个标签和一个命令按钮,其名称分别为Label1、Label2和Command1,然后编写下列程序: Private Sub rune(L AS Labe1) Caption="1234" End Sub Private Sub Form. Load( ) Labe11.Caption="ABCDE" Labe12.Caption=10 End Sub Private Sub Command1Click( ) a=Va1(Label2.Caption) Call func(Label1) Label2.Caption a End Sub 程序运行后,单击命令按钮,则在两个标签中显示的内容分别为( )。
A.ABCD和10
B.1234和100
C.ABCD和100
D.1234和10
第14题:
以下能够正确计算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
第15题:
有如下程序: Private Sub Command1_Click() Dim a As Single Dim b As Single a=5:b=4 Call Sub1(a,b) End Sub Sub Sub1(x As Single,y As Single) t=X X=t\Y Y=t Mod y End Sub 在调用运行上述程序后,a和b的值分别为
A.0 0
B. 1 1
C.2 2
D.1 2
第16题:
以下能够正确计算n!的程序是
A.Privas 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
第17题:
在窗体上画一个名称为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
第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 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.出错
第20题:
以下能够正确计算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
第21题:
以下能够正确计算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
第22题:
下列程序运行后的输出结果是______。
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
第23题:
0
1
2
Compilation fails.
第24题:
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”