下列哪条语句是正确的()
第1题:
若w、x、y、z、m均为int型变量,则执行下列的语句后m的值是( )
w=2,x=3,y=4,z=5;
m=(w<x)?w:x;
m=(m<z)?m:z;
m=(m<y)?m:y;
A.2
B.3
C.5
D.4
第2题:
单击按钮时,以下程序运行后的输出结果是 Private Sub proc1(x As Integer,y As Integer,z As Integer) x=3*z y=2*z z=x+y End Sub Private Sub Command1_Click() Dim x As Integer,y As Integer,Z As Integer x=1:y=2:z=3 Call proc1(x,x,z) Print x;x;z Call proc1(x,y,y) Print x;y;y End Sub
A.6 6 12 `
B.9 5 10 6101051010
C.9 6 12
D.9 10 10 910155410
第3题:
A567 563
B567 567
C567 167
D567 163
第4题:
单击命令按钮时,下列程序的执行结果是 Private Sub Command1_Click( ) Dim a As Integer,b As Integer,c As Integer a=3 b=4 C=5 Print SecProc(c,b,A)End Sub Function Fir Proc(x As Integer,y As Integer,z As Integer) Fir Proc=2*x+y+3*z End Function Function SecProc(x As Integer,y As Integer,z As Integer) SecProc=FirProc(z,x,y)+x End Function
A.20
B.22
C.28
D.30
第5题:
请选出以下程序的输出结果_______。 #include<stdio.h> sub(x,y,z) int x,y,*z; {*z=y-x;} main(){ int a,b,c; sub(10,5,&A) ;sub(7,a,&B) ;sub(a,b,&C) ; printf("%d,%d,%d\n",a,b,C) ; }
A.5,2,3
B.-5,-12,-7
C.-5,-12,-17
D.5,-2,-7
第6题:
单击命令按钮时,下列程序的执行结果是
Private Sub Command1_Click()
Dima As Integer,b As Integer,c As Integer
a=3:b=4:c=5
Print SecProc(c,b,A)End Sub
Function FirProc(x As Integer,y As Integer,z As Integer)
FirProc=2*x+y+3*z+2
End Function
Function SecProc(x As Integer,y As Integer,z As Integer)
SecProc=FirProc(z,x,y) +x+7
End Function
A.20
B.25
C.37
D.32
第7题:
请选出以下程序的输出结果( ) #include<stdio.h> sub(x,y,z) int x,y,*z; { *2=y-x;} main() { int a,b,c; sub(10,5,&A) ;sub(7,a,&B) ;sub(a,b,&C) ; printf("%d,%d,%d\n",a,b,C) ; }
A.5,2,3
B.-5,-12,-7
C.-5,-12,-17
D.5,-2,-7
第8题:
单击命令按钮执行下列程序,其输出结果是。 Private Sub Commana1_Click() Dim a As Integer,b As Integer,c As Integer a = 3 b = 4 c = 5 Print SecProc(c,b,a) End Sub Function FirProc(x As Integer,y As Integer,z As Integer) FirProc = 2 * x + y + 3 * z End Function Function SecProc(x As Integer,y As Integer,z As Integer) SecProc = FirProc(z,x,y) + x End FunctionA. 20 B. 22 C. 28 D. 30
第9题:
设有如下过程: Sub ff(x,y,z,) x=y+z End Sub 以下所有参数的虚实结合都是传址方式的调用语句是( )。
A.Call ff(5,7,z)
B.Call ff(x,y,z)
C.Call ff(3+x,5+y,z)
D.Call ff(x+y,x-y,z)
第10题:
若有以下程序段; #include<iostream> using namespace std; int main() { int a[]={1,4,5}; int *p=&a[0],x=6,y,z; for(y=0;y<3;y++) z=((*(p+y)<x) ? *(p+y):x); cout<<z<<end1; return 0; } 程序运行后的输出结果是( )。
A.1
B.4
C.5
D.2