阅读下列程序:PrivateSubCommand1_Click()Dim i As Integer,k As Integerk=2For i=1 To 3Print Fun(k);NextEnd SubFunction Fun(j As Integer)Static ba=0a=a+1b=b+1Fun=a*b+jEnd Function 程序运行后,单击命令按钮输出结果是A.234B.345C.567D.356

阅读下列程序:

PrivateSubCommand1_Click()

Dim i As Integer,k As Integer

k=2

For i=1 To 3

Print Fun(k);

Next

End Sub

Function Fun(j As Integer)

Static b

a=0

a=a+1

b=b+1

Fun=a*b+j

End Function 程序运行后,单击命令按钮输出结果是

A.234

B.345

C.567

D.356


相关考题:

请阅读以下程序:includeincludevoid fun(int b[]){static int i=0;do{b[i] 请阅读以下程序: #include<stdio.h> #include<string.h> void fun(int b[]) { static int i=0; do {b[i]+=b[i+1]; }while(++i<2);} main() { int k,a[5]={1,3,5,4,9}; fun(A); for(k=0;k<5;k++)printf("%d",a[k]);} 上面程序的输出是( )。A.13579B.48579C.48549D.48999

阅读下列程序说明和C代码,把应填入其中n处的字句写在答卷的对应栏内。【说明】程序利用选择排序算法对数组a中的N个整数按照从小到大的顺序排列,并将排序结果显示出来。【程序】define N 10main(){void (1);int i,a[N];for(i=0;i<10,i++) /*输入*/scanf(“%d”,a[i]);(2);for(i=0;i<N,i++) /*输出*/printf(“%3d”,a[i]);}void selectSon(int x[],int n){int i,j,k,t;for(int i=0; (3);i++){k=i;for(j=i+1;j<n;j++)if (4) k=j;if (5){t=x[i];x[i]=x[k];x[k] =t;}}}

有如下程序:Private Sub Command1_Click()Dim k As Integer, m As IntegerDim p As Integerk=4: m=1p=PC(k, m) : Print p;p=PC(k, m) : Print pEnd SubPrivate Function PC(a As Integer, b As Integer)Static m As Integer, i As Integerm=0: i=2i=i + m + 1m=i + a + bPC=mEnd Function程序运行后,输出的结果为( )。A.4 6B.6 6C.8 8D.10 12

有如下程序: Private Sub Command1_Click() Dim k As Integer,m As Integer Dim p As Integer k=4:m=1 p=PC(k,m):Print p; p=PC(k,m):Print p End Sub Private Function PC(a As Integer,b As Integer) Static m As Integer,i As Integer m=0:i=2 i=i + m + 1 m=i + a + b PC=m End Function 程序运行后,输出的结果为A.4 6B.6 6C.8 8D.10 12

有如下程序: Private Sub Command1_Click() Dim k As Integer,m As Integer Dim op As Integer k=4:m=1 p=PPC(k,m):Print op; p=PPC(k.m):Print op End Sub Private Function PPC(a As Integer,b As Integer) Static m As Integer,i As Integer m=0:i=2 i=i+m+1 m=i+a+b PPC=m End Function 程序运行后,输出的结果为A.4 6B.6 6C.8 8D.10 12

下列程序执行后的输出结果是______。 main() { int m[][3]={1,4,7,2,5,8,3,6,9} int i,k=2 for(i=0;i<3;i++) {print("%d",m[k][i]);} }A.456B.258C.369D.789

有如下程序。Private Sub Command1_Click()Dim k As Integer, m As IntegerDim op As Integerk=4: m=1op=PPC(k, m) : Print op;op=PPC(k, m) : Print opEnd SubPrivate Function PPC(a As Integer, b As Integer)Static m As Integer, i As Integerm=0: i=2i=i + m + 1m=i + a + bPPC=mEnd Function程序运行后,输出的结果为A.4 6B.6 6C.8 8D.10 12

有如下程序:Private Sub Command1_Click() Dim k As Integer,m As Integer Dim op As Integer k=4:m=1 op:PPC(k,m):Print op; op:PPC(k,m):Print opEnd SubPrivate Function,PPC(a As Integer,b As Integer) Static m As Integer,i As Integer m=0:i=2 i=i+m+1 m=i+a+b PPC=mEnd Function程序运行后,输出的结果为A.4 6B.6 6C.8 8D.10 12

阅读下列程序: main() { int n[3],i,j,k; for(i=0;i〈 3;i++) n[i]=0; k=2; for (i=0;i < k;i++) for (j=0;j〈 2;j++) n[j]=n[i]+1; printf("%dn",n[1]); } 下述程序运行后输出结果是A.2B.1C.0D.3

【填空题】请阅读以下程序,该程序运行结果是()。 #include<stdio.h> int main() { int i,b,k=0; for(i=1; i<=5; i++) { b=i%2; while(b-->=0) k++; } printf("%d,%d",k,b); return 0; }