单项选择题
有以下程序:
#include <stdio.h>
int fun()
{ static int x=1;
x*=2;
return x;
}
main( )
{ int i,s=1;
for(i=1; i<=3; i+ +) s*=fun();
printf("%d\n",s);
}
程序运行后的输出结果是______。
A.10
B.30
C.0
D.64
热门试题
单项选择题有以下程序:#include <stdio.h>fun(int x,int y){static int m=0, i=2;i+=m+1; m=i+x+y; return m;}main( ){int j=1, m=1, k;k=fun(j,m); printf( %d, ,k);k=fun(j,m); printf( %d n ,k);}执行后的输出结果是______。
A.5,11
B.5,5
C.11,11
D.11,5