在梁的正应力公式σ=My/Ix中,Ix为梁截面对何轴的惯性矩?()
第1题:
以下程序的运行结果是
sub(int x,int y,int *z)
{*z=y-x;}
main()
{ int a,b,c;
sub(10,5,&a);
sub(7,a,&b);
sub(a,b,&c);
printf("M,M,M\n",a,b,c);}
A.5,2,3
B.-5,-12,-7
C.-5,-12,-17
D.5,-2,-7
第2题:
有如下事件过程: Private Sub Command1_Click( ) Dim m AS Integer,n AS Integer m=2:n=1 Print "m=";m;"n=";n Call TOD(m,n) Print "m=";m;"n=";n End Sub Sub TOD(x,y) x=x^2 y=y^3 End Sub 程序运行后,输出的结果为
A.m=2,n=1 m=1,n=2
B.m=2,n=1 m=4,n=1
C.m=1,n=2 m=1,n=4
D.m=1,n=2 m=2,n=4
第3题:
单击命令按钮时,下列的执行结果为 Private Sub Command1_Click() Dim x As Integer,y As Integer x=86:y=29 Call Proc(x,y) Print x;y End Sub Public Sub Proc(n As Integer,ByVal m As Integer) n=n Mod 10 m=m Mod 10 End Sub
A.12 32
B.6 29
C.2 3
D.12 3
第4题:
有如下程序: 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 * ##
第5题:
在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Commandl_Click() Dim m As Integer, n As Integer, p As Integer m=3: n=5: p=0 Call Y(m, n, p) Print Str(p) End Sub Sub Y(ByVal i As Integer, ByVal j As Integer, k As Integer) k=i+j End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )
A.4
B.6
C.8
D.10
第6题:
在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim in As Integer,n As Integer,p As Integer m=3:n=5:p=0 Call Y(m,n,p) Print Str(p) End Sub Sub Y(ByVal i As Integer,ByVal j As Integer,k As Integer) k=i+j End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是
A.4
B.6
C.8
D.10
第7题:
在窗体上画一个命令按钮,然后编写下列程序: Private Sub Command1 click( ) Dim a As Single,b As Single a=6:b=2 RC a,b Print a,b End Sub Sub RC(x As Single,y As Single) i=x x=i/y y=i Mod y End Sub
A.4 3
B.1 1
C.3 0
D.2 6
第8题:
编写如下事件过程: 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
第9题:
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub sub1(p,m,n) p=p + 1 : m = m + 1 : n =n + 1 Print p;m;n End Sub Private Sub Command1_Click() x=6 : y=4 : z=2 Call sub1(x,y+1,(z)) Print x;y;z End Sub 程序运行后,单击命令按钮,则窗体上第二行显示的内容是
A.7 6 3
B.7 4 2
C.6 4 2
D.4 6 3
第10题:
在窗体上面画一个命令按钮和一个标签,其名称分别为Command1和Label1,然后编写如下代码: Sub S(X As Integer,y As Integer) Static z As Integer y=x*x+Z z=y End Sub Private Sub Command1 Click( ) Dim i As Integer.z As Integer m=0 z=0 For i=1 T0 3 S i,Z m=m+z Next i Label1.Caption=Str(m) 程序运行后,单击命令按钮,在标签中显示的内容是( )。
A.50
B.20
C.14
D.7
第11题:
设有如下程序:
Private Sub Form. Click( )
Dim i As Integer,x As String,y As String
x="ABCDEFG"
For i=4 To 1Step-1
y=Mid(X,i,i)+y
Next i
Print y
End Sub
程序运行后,单击窗体,输出结果为( )。
A.ABCCDEDEFG
B.AABBCDEFG
C.ABCDEFG
D.AABBCCDDEEFFGG
第12题:
以下定义的过程()是按“传值”方式传递参数的。
第13题:
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%)
第14题:
下面各被调用函数首部书写正确的是( )
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);
第15题:
设有如下程序: Private Sub Form. Click( ) Dim i As Integer,x As String,y As String x="ABCDEFG" For i=4 To 1Step-1 y=Mid(X,i,i)+y Next i Print y End Sub 程序运行后,单击窗体,输出结果为( )。
A.ABCCDEDEFG
B.AABBCDEFG
C.ABCDEFG
D.AABBCCDDEEFFGG
第16题:
下面程序的输出结果是( )。 #include"stdio.h" int sub(int m) { static a=4; a+=m; return a; } void main() { int i=2,j=1,k; k=sub(i); k=sub(j); printf("%d",k); }
A.6
B.7
C.8
D.9
第17题:
有如下程序: 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
第18题:
单击命令按钮时,下列程序代码的执行结果为_________。 Public Sub Procl(n As Integer,By Val m As Integer) n=n Mod i() m=m/10 End Sub Private Sub Command1 CliCk() Dim x As Integer,y As Integer x=12:y=34 Call Procl(x,y) Print x;y End Sub
A.12 34
B.2 34
C.2 3
D.12 3
第19题:
单击命令按钮时,下列程序的执行结果为 Private Sub Command1_Click() Dim x As Integer,y As Integer x=50:y=78 Call PPP(x,y) Print x;y End Sub Public Sub PPP(ByVal n As Integer,ByValm As Integer) n=n\10 m=m\10 End Sub
A.08
B.50 78
C.450
D.78 50
第20题:
以下程序的运行结果是 #include<iostream.h> void sub(int x,int y,int*z) { *z=y-x;} void main() { int a,b,c; sub(10,5,&a); sub(7,a,&b); sub(a,b,&c); cout << a <<","<< b<<"," << C << endl;}
A.5,2,3
B.-5,-12,-7
C.-5,-12,-17
D.5,-2,-7
第21题:
当发生Form_Click事件时,下列程序的输出结果是( )。 Private m As Integer,n As Integer Private Sub Form_Click() Dim k As Integer,p As Integer k=6:p=60 Call sub1(k,p) Print m,n,m,k,p Call sub1(k,p) Print m,n,k,p End Sub Private Sub Form_Load() m=7 n=70 End Sub Public Sub sub1(x As Integer,ByVal y As Integer) Dim m As Integer n=n+5 m=n+x+y x=x+y y=x+y End Sub
A.7 75 66 60 7 80 126 60
B.7 75 66 60 7 75 126 60
C.7 75 66 60 7 80 66 60
D.7 75 66 60 7 75 66 60
第22题:
单击命令按钮时,下列程序的执行结果为 Private Sub Command1_Click Dim x As Integer, y As Integer x=12:y=32 Call Proc(x,y. Print x; y End Sub Public Sub Proc(n As Integer, ByVal m As Integer. n=n Mod 10 m=m Mod 10 End Sub
A.1232
B.232
C.23
D.123
第23题:
在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim x As Integer,y As Integer x = 41: y = 54 Call sub1(x,y) x = x + 1 Print x; y End Sub Private Sub sub1(n As Integer, ByVal m As Integer) n=n Mod 10 m=m\10 End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是
A.41 54
B.2 54
C.1 3
D.42 3
第24题:
下列定义abc过程的语句,正确的是()