已知两个周期矩形脉冲信号f1(t)和f2(t):f1(t)和f2(t)的基波幅度之比是多少?
第1题:
(33)下列子过程语句的说明正确的是A.Sub f1(By Val x()As Integer) B.Sub f1(X%())As IntegerC.Function f1l%(f1%) D.Function f1%(x As Integer)
第2题:
A、Sub f1(ByVal n%())
B、 Sub f1(%)As integer
C、 Function f1%(f1%)
D、 Function f1(ByVal n%)
第3题:
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程:
Privfite Sub Command1_Click()
n=5
f=1
s=0
For i=1 To n
f=f 【 】
s=s+f
Next
Ptint S
End Sub
该事件过程的功能是计算s=1+2!+1/3!+...+1/n!的值。请填空。
第4题:
以下程序用于求S=1+3+32+33+…+310的值。
Private Sub Commandl_Click()
S=1
T=1
ForI=1 To 10
T=______
S=S+T
NextI
Print"S=";S
End Sub
第5题:
下面子过程语句说明合法的是
A.Sub f1(s1 As String*8)
B.Sub f1(n()As Integer)As Integer
C.Function f1(f1 As Integer)As Integer
D.Function f1(By Val n As Integer)
第6题:
下面程序的输出结果是。 Private Sub Commandl_Click ch$=“ABCDEF” proc ch:Print ch End Sub Private Sub proc(ch As Stnng) s=“” For k=Len(ch) TO 1 Step -1 s=s&Mid(ch,k,1) Next k ch=s End Sub A.ABCDEF B.FEDCBA C.A D.F
第7题:
下面程序的运行结果是#include #define SIZE 12sub(char *a,int t1,int t2) { char ch; while(t1<t2) { ch=*(a+t1); *(a+t1)=*(a+t2); *(a+t2)=ch; t1++;t2--; }} main() { char s[SIZE]={’A’,’B’,’C’,’D’,’E’,’F’,’G’,’H’,’I’,’J’,’K’,’L’}; int i; sub(s,7,SIZE-1); for(i=0;i<SIZE;i++) printf("%c ",s[i]); printf("\n");}
第8题:
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程:
Privme Sub Command1_Click( )
n=5
f=1
s=0
For i=1 To n
f=f【 】
s=s+f
Next
Print s
End Sub
该事件过程的功能是计算

的值。请填空。
第9题:
假定有以下两个过程: Sub SI (By Val x As Integer,By Val y As Integer) Dim t As Integer t=x x=y y=t End Sub Sub S2(x As Integer,y As Integer) Dim t As Integer t=x x=y y=t End Sub 则以下说法中正确的是______。
A.用过程S1可以实现交换两个变量的值的操作,S2不能实现
B.用过程S2可以实现交换两个变量的值的操作,S1不能实现
C.用过程S1和S2都可以实现交换两个变量的值的操作
D.用过程S1和S2都不能实现交换两个变量的俏的操作
第10题:
下列子过程语句的说明正确的是( )。
A.Sub f1(ByVal x()As Integer)
B.Sub f1(x%())As Integer
C.Function f1%(f1%)
D.Function f1%(x As Integer)
第11题:
有如下程序: 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
第12题:
下列程序运行后的输出结果是______。
Private Sub f(k,s)
s=1
For j=1 To k
s=s*j
Next
End Sub
Private Sub Command1_Click()
Sum=0
For i=1 To 3
Call f(i,s)
Sum=Sum+s
Next
Print Sum
End Sub
第13题:
(27)有下列两个过程: Sub S1(ByVal x As Integer,ByVal y As Integer) Dim t As Integer t=x x=y y=t End Sub Sub S2(x As Integer,y As Integer) Dim t As Integer t=x x=y y=t End Sub 则下列叙述中正确的是 A.用过程S1可以实现交换两个变量的值的操作,S2不能实现B.用过程S2可以实现交换两个变量的值的操作,S1不能实现 C.用过程S1和S2可以实现交换两个变量的值的操作 D.用过程S1和S2不能实现交换两个变量的值的操作
第14题:
第15题:
设有如下程序: Private Sub Form. Click( ) Dim s As Long,f As Long Dim n As Integer,i As Integer f=1 n=4 For i=1 To n f=f*i s=s+f Next i Print s End Sub 程序运行后,单击窗体,输出结果是( )。
A.32
B.33
C.34
D.35
第16题:
现有如下程序: 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
第17题:
下列子过程语句中正确的是( )。
A.Sub f1(ByVal() As Integer)
B.Sub f1(n() As Integer)As Integer
C.Function f1(f1 As Integer)As Integer
D.Function f1(ByVa1 f as Integer)
第18题:
在窗体中有一个名为run34的命令按钮,事件代码如下: Private Sub run34_Click( ) f1=1 f2=1 For n=3 T0 7 F=f1+f2 f1=f2 f2= f Next n MsgBox f End Sub 打开窗体,单击命令按钮,消息框的输出结果是( )。
A.8
B.13
C.21
D.其他结果
第19题:
下列程序运行后的输出结果是______。Private Sub f(k,s) s = 1 for j = 1 To k s=s*j Next jEnd SubPrivate Sub Command1_ Click () Sum = 0 for i = 1 To 3 Call f(i, s) Sum = Sum + s Next i Print Sum End Sub
A.0
B.3
C.6
D.9
第20题:
在窗体中有一个名为run34的命令按钮,事件代码如下:
Private Sub run34_Click( )
f1=1
f2=1
For n=3 T0 7
F=f1+f2
f1=f2
f2= f
Next n
MsgBox f
End Sub
打开窗体,单击命令按钮,消息框的输出结果是( )。
A.8
B.13
C.21
D.其他结果
第21题:
在窗体上画一个名称为Command1的命令按钮,然后编写如下通用过程和命令按钮的事件过程: Private Function f(m As Integer) If m Mod 2 = 0 Then f = m Else f = 1 End If End Function Private Sub Command1_Click() Dim i As Integer s = 0 For i = 1 To 5 s = s + f(i) Next Print s End Sub 程序运行后,单击命令按钮,在窗体上显示的是
A. 11
B.10
C.9
D.8
第22题:
设有如下程序:
Private Sub Form. Click( )
Dim s As Long,f As Long
Dim n As Integer,i As Integer
f=1
n=4
For i=1 To n
f=f*i
s=s+f
Next i
Print s
End Sub
程序运行后,单击窗体,输出结果是( )。
A.32
B.33
C.34
D.35
第23题:
若有如下程序: int s[3] [3]={'a','b','C','d','e','f','g','h','i'},*t; main() {t:(int*)malloc(sizeof(int)); sub(t,s); printf("%c\n",*t); } sub(int*p,int b[][3]) {*p=b[2][1]; } 则程序运行后的输出结果是( )。
A.d
B.e
C.h
D.b