以下程序的输出结果是()。#includedouble f(int n){int i;double s=0;for(i=1;i<=n;i++)s+=1/i;return s;}void main(){int i,m=3;float a=0.0;for(i=0;i<=m;i++)a=a+f(i);printf("%f\n",a);}
A. 3.000000
B. 5.5000000
C. 4.000000
D. 8.25
查看答案
以下程序的输出结果是()。#includeint f(int a){int b=0;static int c=3;a=c++,b++;return a;}void main(){int a,i,t;a=3;for(i=0;i<3;i++)t=f(a++);printf("%d\n",t);}
A. 3
B. 5
C. 4
D. 6
以下程序的执行结果是( )。#includelong ff(int n){if (n>3)return (ff(n-1)+ff(n-2));else return(3);}void main(){printf("%d\n",ff(4));}
A. 6
B. 5
C. 7
D. 8
以下程序的执行结果是( )。#includeint k=1;void fun(int m){m+=k;k+=m;{char k='B';printf("%d,",k-'A');}printf("%d,%d",m,k);}void main(){int i=4;fun(i);printf("%d,%d",i,k);}
A. 2,5,64,6
B. 1,5,64,6
C. 1,6,64,6
D. 1,5,63,6
下列函数调用语句中含有5个实参。fun((a1,a2),(a3,a4,a5));
A. 对
B. 错