计算机二级考试

解析:有以下程序 int a=2; int f(int n) static

来源:网考网计算机二级 所有评论

【单选题】有以下程序
int a=2;
int f(int n)
static int a=3;
int t=0;
if(n%2) static int a=4; t+=a++;
else static int a=5; t+=a++;
return t+a++;
main()
int s=a, i;
for( i=0; i<3; i++) s+=f(i);
 printf("%d\n", s);
程序运行后的输出结果是______。
A.26
B.28
C.29
D.24

网考网参考答案:C
网考网解析:

暂无解析 document.getElementById("warp").style.display="none"; document.getElementById("content").style.display="block"; 查看试题解析出处>>

相关推荐

发布评论 查看全部评论