有如下程序: #includediostream usingnamespacestd; voidfl(intX,inty){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); coutyendl; return0; } 运行时的输出结果是( )。A.10B.16C.26D.36

有如下程序: #included<iostream> usingnamespacestd; voidfl(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<<y<<endl; return0; } 运行时的输出结果是( )。

A.10

B.16

C.26

D.36


相关考题:

如下程序的输出结果是______。 include using namespace std; int funl(int x){retu 如下程序的输出结果是______。include<iostream>using namespace std;int funl(int x){return++x;}int fun2(int&x){return++x;}int main( ){int x:1,y=2;Y=funl(fun2(x));cout<<x<<','<<y;return 0;}

有如下程序:includeusing namespace std;class Amount{int amount;public:Amount(int 有如下程序: #include<iostream> using namespace std; class Amount{ int amount; public: Amount(int n=0):amount(n){ } int getAmount( )const{return amount;} Amountoperator+=(Amount A) { amount+=a.amount; return; } }; int main( ){ Amount x(3),y(7); x+=y: cout<<x.getAmount( )<<endl; return 0; } 已知程序的运行结果是10,则下画线处缺失的表达式是A.*thisB.thisC.amountD.amount

以下程序执行后的输出结果是( )。include usingnamespacestd;void try(int,int,int,in 以下程序执行后的输出结果是( )。 #include <iostream> using namespace std; void try(int,int,int,int); int main ( ) { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<end1; return 0; } void try(int x,int y, int z,int r) { z = x+y; x = X*X; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

有如下程序:#includediostreamusingnamespacestd;voidfl(intX,inty){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);coutyendl;return0;}运行时的输出结果是( )。A.10B.16C.26D.36

如下程序的输出结果是includeincludeusing namespace std;class CSum{int 如下程序的输出结果是 #include<iostream> #include<iomanip> using namespace std; class CSum{ int x,y; public: CSum(int x0,int y0):X(x0),y(y0){ } friend ostream operator<<(ostream os,const CSum xA) { os<<setw(5)<<xa.x+xa.y: return os; } }; int main( ){ CSum y(3,5); cout<<setfill('*')<<8; cout<<y; return 0; }A.88B.****88C.****8****8D.8****8

以下程序执行后的输出结果是include using namespace std;void try(int,int,int,int) 以下程序执行后的输出结果是 #include <iostream> using namespace std; void try(int,int,int,int); int main () { int x,y,z,r; x =1 ; y = 2; try(x,y,z,r); cout<<r<<endl; return 0; } void try(int x,int y,int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

有以下程序:include using namespace std;define PI 3.14class Point{ private:int 有以下程序: #include <iostream> using namespace std; #define PI 3.14 class Point { private: int x,y; public: Point(int a,int b) { x=a; y=b; } int getx() { return x; }A.314B.157C.78.5D.153.86

以下程序执行后的输出结果是()。includeusing namespace std;void try(int,int,int,in 以下程序执行后的输出结果是( )。 #include<iostream> using namespace std; void try(int,int,int,int); int main() { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<endl; return 0; } void try(int x,int y, int z,int r) { z = x+y; X = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

以下程序执行后的输出结果是include.using namespace std;void try(int,int,int,int) 以下程序执行后的输出结果是 #include<iostream>. using namespace std; void try(int,int,int,int); int main() { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<end1; return 0; } void try(int x,int y, int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

以下程序输出的结果是()。includeusing namespace std;int main(){int **x,*y,z=10;y= 以下程序输出的结果是( )。 #include<iostream> using namespace std; int main() { int **x,*y,z=10; y=z; x=y; cout<< **x+1<<endl; return 0; }A.11B.x的地址C.y的地址D.运行错误