线性系统的输入信号为Xi(t)=sinωt,则其输出信号响应频率为()。
第1题:
请选出以下程序的输出结果
#include<stdio.h>
main()
{ int a[]={1,2,3,4},i;
int x=0;
for(i=0;i<4;i++)
{ sub(a,x);printf("%d",x);}
printf("\n");}
sub(s,y)
int *s,y;
{ static int t=3;
y=s[t];t--; }
A.1 2 3 4
B.4 3 2 1
C.0 0 0 0
D.4 4 4 4
第2题:
有如下SUB过程:
Sub s(x As Single,y As Single)
t=x
x=t / y
y=t Mod y
End Sub
在窗体上添加一个命令按钮,然后编写如下事件过程:
Private Sub Form_Click()
Dim a As Single
Dim b As Single
a=5
b=4
s a,b
Print a,b
End Sub
则程序运行后,单击命令按钮,输出的结果为【 】 。
第3题:
下面程序段的运行结果是【 】。
Option Base 1
Private Sub swap(a()As InteSer)
For I=1 to 10\2
t=a(i)
a(i)=a(10-1+1)
a(10-1+1)=t
Next1
End Sub
Private Sub Form_Click()
Dim x(10)As Integer
For I=1 to 10
x(i)=I*2
Next1
Swap x()
For1=1 to 10
Print x (i)
Next I
End Sub
第4题:
现有如下程序: Private Sub Command1_Click() s=0 For i=1 To 5 s=s+f(5+i) Next Print s End Sub Public Function f(x As Integer) If x>=10 Then t=x+1 Else t=x+2 End If f=t End Function 运行程序,则窗体上显示的是( )。
A.38
B.49
C.61
D.70
第5题:
有如下事件过程:
Private Sub Form. Active ( )
Dim Score (1 to 3) As Integer
Dim i As Integer
Dim t As Variant
Fori=3 To 1 step-1
Score (i) = 2 * i
Next
For Each t In Score
Print t
Next
End Sub
程序运行后窗体上显示的值为【 】。
第6题:
(12)有下列Sub过程: Sub Sub(x As Single,y As Single) t=x x=t/y y=t Mody End Sub 在窗体上的命令按钮Commandl中,编写下列事件过程,执行该事件过程调用Sun过程,结果是( )。 Private Sub Commandl_Click() Dim a As Single Dim b As Single a=5 b=4 Sun a,b Print a;b End Sub A.1.25 1 B.5 4 C.4 5 D.1 1.25
第7题:
下面程序段的运行结果是【 】。
Option Base 1
Private Sub Swap (a() As Integ
For I=1 to 10\2
t=a(I)
a(I)=a(10-I+1)
a(10-I+1)=t
Next I
End Sub
Private Sub Form_Click()
Dim x(10) As Integer
For I=1 to 10
x(I)=I*2
Next I
Swap x()
For I=1 to 10
Print x(I)
Next I
End Sub
第8题:
窗体上有名称分别为Text1、Text2的2个文本框,要求文卒框Text1中输入的数据小于500,文本框Text2中输入的数据小于1000,否则重新输入。为了实现上述功能,在以下程序中问号(?)处应填入的内容是______。 Private Sub Text1 LostFocus() Call CheckInput(Text1,500) End Sub Private Sub Text2 LostFocus() Call CheCkInput(Text2,1000) End Sub Sub CheckInput(t AS ?,x As Integer) If Val(t.Text)>X Then MsgBox "请重新输入!" End If End Sub
A.Text
B.SelText
C.Control
D.Form
第9题:
有如下程序: 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
第10题:
下面程序段,运行后的结果是 Private Sub Commandl_Click( ) Dim b%(1 To 4),i%,t# For i=1 To 4 b(i)=i Next i t=Tof(b( ) ) Print"t=";t, End Sub Function Tof(a() As Integer) Dim t#,i% t=1 For i=2 To UBound(A)t=t * a(i) Next i Tof=t End Function
A.t=18
B.t=24
C.t=30
D.t=32