下面代码运行结果是 。 using namespace std; #include <iostream> int f(int x) { static int u=1; x += x; return u *= x; } int main(){ int x=10; cout<<f(x)<< '\t'; return 0;> A、10 20
B、20 800
C、20 400
D、20 20
B、20 800
C、20 400
D、20 20
A.12,18,30
B.-12,6,8
C.6,8,10
D.12,-18,16
#include
usingnamespacestd;
voidf1(int&X,int&y){intz=x;x=y;y=z;}voidf2(intX,inty){intz=x;x=y;y=z;}intmain(){
intx=10,y=26;
f1(x,y);
f2(x,y);
cout$amp;return0;
}
运行时的输出结果是()。
A.10
B.16
C.26
D.36
include <iostream>
using namespace std;
void fun(int &a, int b=3)
{
static int i=2;
a = a + b + i;
i = i + a;
}
int main()
{
int x=5, y=2;
fun(x, y);
cout<<x<<",";
fun(x);
cout<<x<<end1;
return 0;
}
B.2323
C.3232
D.3223
15、执行下面程序: #include<iostream> using namespace std; void f(int n){ if (n/10){ cout<<n%10<<","; f(n 10);} else } int main(){ f(638); 0;> A、6,3,8
B、8,3
C、8,3,6
D、语法错
A、int &f1();
B、int f2(double=5);
C、void f3(void (*p)());
D、int f4(int a=0,int b);
B、9
C、4
D、6
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!