首页 > 职业考试题库1 > 题目详情
有以下程序: int a=2; int f(int n) {static int
题目内容:
[单选题]有以下程序: 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
本题链接: