废气中的NOx不论是汽油机和柴油机都是在经济工况下,浓度最大。
第1题:
下面各被调用函数首部书写正确的是( )
A.void sub(float x;float y);
B.void sub(float x,y)
C.void sub(float x,float y)
D.void sub(float x,float y);
第2题:
在窗体中添加一个名称为Command1的命令按钮,然后编写如下程序: Public x As Integer Private Sub Command1_Click() x=10 Call s1 Call s2 MSgBox x End Sub Private Sub s1() x=x+20 End Sub Private Sub s2() Dim x As Integer x=X+20 End Sub 窗体打开运行后,单击命令按钮,则消息框的输出结果为______。
A.10
B.30
C.40
D.50
第3题:
有如下程序: 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
第4题:
若有以下变量和函数说明: #include<iostream.h> charCh='*'; void sub(int x,int y,char ch,double*Z) { switch(ch) { case'+':*Z=x+y;break; case'-':*Z=x-y;break: case'*':*Z=x*y;break; case'/':*z=x/y;break: } } 以下合法的函数调用语句是( )。
A.sub(10,20,Ch,y);
B.sub(1.2+3,2*2,'+',&Z);
C.sub(sub(1,2,'+',&y),sub(3,4'+',&x),'-',&y);
D.sub(a,b,&x,ch);
第5题:
执行下面程序,第一行输出结果是【 】,第二行输出结果是47。
Option Explicit
Private Sub Form_Click( )
Dim A As Integer
A=2
Call Sub1 (A) End Sub
Private Sub1 (x As Integer)
x=x*2+1
If x<10 Then
Call Sub1 (x)
End If
x=x*2+1
Print x
End Sub
第6题:
有如下程序。 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
第7题:
现有如下Sub过程: Sub fun(x es single,y as single) t = x x = t/y y = t mod y End sub在窗体上添加命令按钮(cmD) ,编写如下事件过程: Private sub cmd_click( ) Dim a as single Dim b as single a = 5 b = 4 fun a, b Msgbox a & chr(10) + chr(13) & b End sub运行程序后,单击按钮,则在消息框中显示的内容为( )
A.1和1
B.1.25和1
C.1.25和4
D.5和4
第8题:
有如下程序: Private Sub Command1 Click() Dim a As Single Dim b As Single a=5:b=4 Call S(a,B)End Sub Sub S(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
第9题:
以下定义的过程()是按“传值”方式传递参数的。
第10题:
下列定义abc过程的语句,正确的是()
第11题:
对
错
第12题:
CALL SUB(N,N)
CALL SUB(X,X)
CALL SUB(N+2,X)
CALL SUB(N,X+3)
第13题:
在窗体中添加一个名称为Cmd的命令按钮,然后编写如下程序: Public x As integer Private Sub Cmd_Click() x=10 Call add1 Call add2 MsgBox x End Sub Private Sub add1 ( ) x=x+20 End Sub Private Sub add2 ( ) Dim x As integer x=x+40 End Snb 窗体打开运行后,单击命令按钮,则消息框的输出结果为( )。
A.10
B.60
C.30
D.70
第14题:
有以下程序:
int sub(int n) { return(n/10+n%10); }
main()
{ int x, y;
scanf("% d", &x);
y=sub(sub(sub(x)));
printf("% d\n", y);
}
若运行时输入:1234<回车>,程序的输出结果是【 】。
第15题:
窗体上有一个名称为Picturel的图片框控件,一个名称为Label1的标签控件,如下图所示。
现有如下程序: Public Sub display (x As Control) If TypeOf x Is Label Then x.Caption="计算机等级考试" Else x.Picture=LoadPicture("piC.jpg") End If End Sub Private Sub Labell_Click() Call display(Labell) End Sub Private Sub Picture1_Click() Call display(Picture1) End Sub 对以上程序,下列叙述中错误的是( )。
A.程序运行时会出错
B.单击图片框,在图片框中显示一幅图片
C.过程中的x是控件变量
D.单击标签,在标签中显示一串文字
第16题:
有如下一个Sub过程: Sub mlt(ParamArray numbers()) n=1 For Each x In numbers n=n*x Next x Print n End Sub 在一个事件过程中如下调用该Sub过程: Private Sub Command1_Click() Dim a As Integer Dim b As Integer Dim c As Integer Dim d As Integer a=1 b=2 c=3 d=4 mlt a,b,c,d End Sub 该程序的运行结果为( )。
A.12
B.24
C.36
D.48
第17题:
在窗体中添加一个名称为Commandl的命令按钮,然后编写如下程序:Public X As Integer Private Sub Commandl Click( )x=10 Call slCall s2MsgBox x End Sub Private Sub sl( )x=x+20 End Sub Private Sub s2( )Dim x As Integer x=x+20End Sub窗体打开运行后,单击命令按钮,则消息框的输出结果为( )。
A.10
B.30
C.40
D.50
第18题:
在窗体中添加一个名称为Commandl的命令按钮,然后编写如下程序: Public x As Integer Private Sub Commandl_click() x=10 Call s 1 Call s 2 MsgBOx x End Sub Pfivate Sub s1() x=x+20 End Sub Private Sub
A.10
B.30
C.40
D.50
第19题:
有如下一个Sub过程: Sub mlt (ParamArray numbers()) n=1 For Each x In numbers n=n * x Next x Print n End Sub在一个事件过程中如下调用该Sub过程: Private Sub Coinmand1_Click() Dim a As Integer Dim b As Integer Dim c As Integer Dim d As Integer a=1 b=2 c=3 d=4 mlt a,b,c,d End Sub 则运行该程序,结果为______。
A.12
B.24
C.36
D.48
第20题:
有如下Sub过程:
Sub ind(a As Integer)
Static x As Integer
x= x + a
Print x:
End Sub
以下是调用它的事件过程,程序运行后,单击命令按纽Command1三次,输出结果为【 】。
Private Sub Command1_Click()
Ind 2
End Sub
第21题:
以下关于Sub过程叙述中错误的是()。
第22题:
CALL SUB(N,N)
CALL SUB(X,X)
CALL SUB(N,X*X)
CALL SUB(11,X)
第23题:
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