单选题 C语言
题号 #2272910

有以下程序:
#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);
}
程序运行后的输出结果是(  )。

进入在线模考

参考答案

D

答案解析

函数fun()是2的次方的运算,而s*=fun(),所以答案为64。

你可能感兴趣的试题

找试题 · 找答案 · 找资料 在线模考