![](https://lstatic.shangxueba.com/sxbzda/h5/images/m_q_title.png)
下面程序的输出结果是________________ int x=1; f() { static int i=2; int x=10; x+=++i; printf(“%d,”,x); } void main() { int i; for(i=1;i<4;i++) { ++x; f(); } printf(“%d\n”,x);>
![](https://lstatic.shangxueba.com/sxbzda/h5/images/tips_org.png)
第1题
A.4
B.6
C.8
D.12
第2题
A.7
B.15
C.157
D.538
第3题
A.4
B.1
C.0
D.8
第4题
include<iostream.h>
int f(int);
void main() {
int x=1, i;
for (i=0; i<3; i++)
cout<<f(x)<<‘ ’ ;
cout<<end1;
}
int f(int x){
int y=1;
static int z=3
y++;
z++;
return (x+y+z);
}
第5题
A、192
B、29
C、25
D、编译出错
第6题
f1(intx,int y)
4
{
static int count=0;
int temp;
temp=x;
x=y;
y=temp;
count++;
}
则下列叙述正确的是()。
A.变量count为全局变量, temp为局部变量。
B.x,y属于函数的形式参数。
C.变量count,temp均为局部变量。
D.函数的功能是实现两个变量值的交换。
E.函数的默认返回值类型为 int,函数没有返回任何值。
F.变量count,temp为局部变量,所占空间在函数退出时释放。
第7题
A、9
B、6
C、4
D、3
第8题
第9题
运行下面程序后的输出结果为_______。
#include <stdio.h>
main()
{int a=2,i;
for(i=0;i++<3;)
printf(“%d”,f(a)); printf(“\n”);
}
f(int x)
{int y=0;static int z=3;
y++,z++;
return (x+y+z);
}
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!