有关C4,错误的有()
第1题:
A、Public Sub Sum(x ; y)
B、Public Sub Sum(ByVal x, ByVal y)
C、Public Sub Sum(x As Integer,y As Integer)
D、Public Sub Sum(x%, y%)
第2题:
以下有关数组定义的语句序列中,错误的是 ______。
A.Static arrl(3) arrl(1)=100 arrl(2)="Hello" arrl(3)123.45
B.Dim arr2()As Integer Dim size As Integer Private Sub Command2_click() size=InputBox("输入:") ReDimarr2(size) End Sub
C.Option Base1 Private Sub Command3_click() Dim arr3(3)As Integer End Sub
D.Dim n As Integer Private Sub Command4_Click() Dim arr4(n)As Integer End Sub
第3题:
下列Sub 过程中描述错误的是______。
A.Sub 过程只能在窗体模块中定义
B.Goto 语句不能用于Sub 过程
C.Sub 过程只能在窗体模块中定义
D.Sub 过程中不能嵌套定义Sub 过程
第4题:
写出程序运行的结果
Public class Base
Public virtual string Hello() {return “Base”;}
Public class Sub:Base
Public override string Hello() {return “Sub”;}
1. Base b = new Base(); b.Hello;
2. Sub s = new Sub(); s.Hello;
3. Base b = new Sub (); b.Hello;
4. Sub s = new Base(); s.Hello;
第5题:
假定有如下的Sub过程:Sub Sub1 (x As Single, y As Single) t=x x = t/y y = t Mod yEnd Sub 在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_ Click() Dim a As Single Dim b As Single a = 5 b = 4 Sub1 a, b Print a; b End Sub 程序运行后,单击命令按钮,输出结果为______。
A.5 4
B.1 1
C.1.2 5.4
D.1.25 1
第6题:
在窗体中添加一个命令按钮,编写如下程序:
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
第7题:
class super { public int getLength() {return 4;} } public class Sub extends Super { public long getLength() {return 5;} public static void main (String[]args) { super sooper = new Super (); Sub sub = new Sub(); System.out.printIn( sooper.getLength()+ “,” + sub.getLength() }; } What is the output?()
第8题:
关于VBScript过程,下列说法错误的是()。
第9题:
CO
<p>CH<sub>4</sub>、SO<sub>2</sub></p>
<p>SO<sub>2</sub>、CO</p>
<p>CO、CH<sub>4</sub>、SO<sub>2</sub></p>
第10题:
4, 4
4, 5
5, 4
5, 5
The code will not compile.
第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题:
m<sub>0</sub><m<sub>e</sub><(x
m<sub>0</sub>=m<sub>e</sub>=(x
m<sub>0</sub>>m<sub>e</sub>>(x
m<sub>e</sub><m<sub>0</sub><(x
第13题:
以下有关数组定义的语句序列中,错误的是
A.Static arrl(3) arr1(1)=100 arrl(2)="Hello" arrl(3)=123.45
B.Dim arr2()As Integer Dim size As Integer Private Sub Command2_Click() size=InputBOX(“输入:”) ReDim arr2(size) ┄ End Sub
C.Option Base 1 Private Sub Command3_Click() Dim arr3(3)As Integer ┄ End Sub
D.Dim n As Integer Private Sub Command4_Click() Dim arr4(n)As Integer ┄ End Sub
第14题:
在窗体中添加一个命令按钮,编写如下程序: Private Sub Subl(p,m,n) p=p+1:m=m+1:n=n+1 Print"subl:";p;m;n End Sub Private Sub Command1_Click() al=1:b=2:c1=3 Call Subl(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
第15题:
假定有如下的Sub过程:
Sub Sub1(x As Single,y As single)
t=x
x=t/y
y=t Mod y
End Sub
在窗体上画一个命令按钮,然后编写如下事件过程:
Private Sub Command1_click()
Dim a As Single
Dim b As Single
a=5
b=4
Sub1 a,b
Print a;b
End Sub
程序运行后,单击命令按钮,输出结果为
A.
B.
C.
D.
第16题:
在窗体中添加一个命令按钮,编写如下程序: Private Sub Test(p,m,n) p=p+1:m=m+1:n=n+1 Print "Sub: ";p;m;n End Sub Private Sub Command1.Click() a1=1:b=2:c1=3 Call Test((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
第17题:
有程序如下: 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.出错
第18题:
在窗体中添加一个命令按钮,编写如下程序: 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
第19题:
class Super { public int getLenght() { return 4; } } public class Sub extends Super { public long getLenght() { return 5; } public static void main(String[] args) {Super sooper = new Super(); Sub sub = new Sub(); System.out.println( sooper.getLenght() + “,” + sub.getLenght() ); } } What is the output? ()
第20题:
4,4
4,5
5,4
5,5
Compilation fails.
第21题:
<p>1K<sub>m</sub></p>
<p>2K<sub>m</sub></p>
<p>3K<sub>m</sub></p>
<p>4K<sub>m</sub></p>
<p>5K<sub>m</sub></p>
第22题:
4,4
4,5
5,4
5,5
Compilation fails.
第23题:
<p>I<sub>S</sub>=10.0413A,U<sub>rel</sub>=5×10<sup>-5</sup>,k=2 </p>
<p>I<sub>S</sub>=10.0413(1±5×10<sup>-5</sup>)A,k=2 </p>
<p>I<sub>S</sub>=(10.0413±5×10<sup>-5</sup>)A,k=2 </p>
<p>I<sub>S</sub>=10.0413A,U<sub>95rel</sub>=5×10<sup>-5</sup>,V<sub>eff</sub>=9 </p>
第24题:
Function函数有返回值
call语句用于Sub或Function过程的调用
调用Sub过程时call语句可以省略,但是调用Function过程时不可以省略
使用Exit Sub语句可以从Sub过程中立即退出