下列程序运行的结果为()。#includefun(int x,int y,int *cp,int *dp){*cp=x+y;*dp=x-y;}main(){int a,b,c,d ;a=30 ;b=50;fun(a,b,&c,&d);printf(“%d,%d/n”,c,d);}
A.50,30
B.30,50
C.80,-20
D.80,20
A.50,30
B.30,50
C.80,-20
D.80,20
第1题
A.9
B.10
C.15
D.24
第2题
A.10
B.30
C.1030
D.3010
第3题
A.0
B.100
C.10
D.11
第4题
A.8
B.7
C.5
D.6
第5题
A.k=4
B.k=6
C.k=7
D.k=8
第7题
写出下列程序的运行结果。
#include void Fun(){int num=20;cout<< "The Fun's num is"<< num<< endl;
}void main(){int num=10;cout<< "The main's num is "<< num<< endl;Fun();{int num=30;
cout<< "The Field's num is "<< num<< endl;}cout<< "The main's num is "<< num<< endl;}
第8题
运行以下程序,输出结果为()。s='a1b2c3d4' lst=[] n=len(s) for i in range(0,n,2): lst.append(s[i:i+2] ) print(lst[-3])
第9题
阅读下列程序并写出程序运行结果。
Public Sub change1(ByVal x As Integer, ByVal y As Integer)
Dim t As Integer
t = x
x = y
y = t
End Sub
Public Sub change2(x As Integer, y As Integer)
Dim t As Integer
t = x
x = y
y = t
End Sub
Private Sub Form_Click()
Dim a As Integer, b As Integer
a = 22: b = 33
change1 a, b
Form1.Print "A1="; a, "B1="; b
a = 22: b = 33
change2 a, b
Form1.Print "A2="; a, "B2="; b
End Sub
写出程序运行时,单击窗体Form1上的输出结果。
第10题
第11题
A.9
B.5
C.6
D.6.1