网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

(10)以下程序运行后的输出结果是 【10】 。

#include <stdio.h>

main()

{ int x=10,y=20,t=0;

if(x==y)t=x;x=y;y=t;

printf("%d %d\n",x,y);

}


参考答案

更多 “ (10)以下程序运行后的输出结果是 【10】 。#include stdio.hmain(){ int x=10,y=20,t=0;if(x==y)t=x;x=y;y=t;printf("%d %d\n",x,y);} ” 相关考题
考题 阅读下面程序: include void fun(int n) { int x(5); static int y(10); if(n>0) { 阅读下面程序:include<iostream.h>void fun(int n){int x(5);static int y(10);if(n>0){++x;++y;cout<<x<<","<<y<<end1;}}void main(){int m(1);fun(m);}则该程序的输出结果是______。

考题 以下程序运行后的输出结果是【】。 include using namespace std; int main() {int i=10, 以下程序运行后的输出结果是【 】。include<iostream>using namespace std;int main(){int i=10,i:0;do{j=j+i;i--;}while(i>2);cout<<j<<end1;return 0;}

考题 阅读下面程序: include void f(int n) { int x(5); static int y(10); if(n>0) { ++ 阅读下面程序:include<iostream.h>void f(int n){int x(5);static int y(10);if(n>0){++x;++y;cout<<x<<","<<y<<endl;}}void main(){int m(1);f(m),}则该程序的输出结果是【 】

考题 以下程序执行后的输出结果是( )。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.不确定

考题 以下程序运行后的输出结果是【】。 include void fun(int x,int y) {x=x+y;y=x-y 以下程序运行后的输出结果是【 】。include<iostream.h>void fun(int x,int y){ x=x+y;y=x-y;x=x-y;cout<< x << "," <<y << " ,";}void main( ){ int x=2,y=3;fun(x,y);cout<< x << "," << y << endl;}

考题 若有以下程序: include using namespace std; template T min(T x,T y) {i 若有以下程序:include <iostream>using namespace std;template <class T>T min(T x,T y){if(x<y)return x;elsereturn y;}int main(){int n1=2,n2=10;double d1=1.5;d2=5.6;cout<<min(n1,n2)<<",";cout<<min(d2,d2)<<end1;return 0;}程序运行后的输出结果是【 】。

考题 有以下程序: include using namespace std; int main() {int i=010,j=10;cout 有以下程序:include <iostream>using namespace std;int main(){int i=010,j=10;cout<<(++i)<<","<<i--<<end1;return 0;}则该程序运行后的输出结果是【 】。

考题 有以下程序:include main() {int a[] = {2,4,6,8,10} ,y =0,x, * p;p =a[1];for( 有以下程序: #include <stdio.h> main() { int a[] = {2,4,6,8,10} ,y =0,x, * p; p =a[1]; for(x=1;x<3;x++)y+ =p[x]; printf( "% d \n" , y); }程序运行后的输出结果是( )。A.10B.11C.14D.15

考题 有如下程序:include void fun(int x, int y){int t=x;x=y;y=t;}int main (){int 有如下程序: #include <iostream> void fun(int x, int y){int t=x;x=y;y=t;} int main () { int a[2]={23,42}; fun(a[1],a[0]); std::cout<<a[0]<<","<<a[1]<<std::endl; return 0; } 执行后的输出结果是A.42,42B.23,23C.23,42D.42,23

考题 有以下程序:includevoid main(){int x=l0,y=l0:for(int i=0;x>8;y=++i)cout 有以下程序: #include<iostream.h> void main() { int x=l0,y=l0: for(int i=0;x>8;y=++i) cout<<x--<<","<<y<<",": } 该程序运行后的输出结果是( )。A.10,1,9,2B.9,8,7,6C.10,9,9,0D.10,10,9,1

考题 以下程序运行后的输出结果是( )。 include main() { int x=20; printf("%d", 0 以下程序运行后的输出结果是( )。include<stdio.h>main(){ int x=20;printf("%d", 0<x<20);printf("%d\n", 0<x x<20);}

考题 以下程序运行后的输出结果是 。inc]udcmain(){int x=10.y=20.t=0;if(x==y) t=x;x=y;y=1;printf(“%d %d/n”.x,y);

考题 有以下程序段:include define MIN(x,y)(x) 有以下程序段:include<iostream.h>define MIN(x,y) (x)<(y)?(x):(y)void main(){int i,j,K;i=10;j=15;k=10*MIN (i,j);cout<<k<<endl;}程序执行后的输出结果是______。

考题 以下程序运行后的输出结果是______。 main() { int a,b,c; a=10;b=20;c=(a%b1); printf 以下程序运行后的输出结果是______。 main() { int a,b,c; a=10;b=20;c=(a%b<1)||(a/b>1); printf("%d %d %d\n",a,b,c); }A.10 20 1B.20 10 0C.10 20 0D.10 10 0

考题 以下程序运行后的输出结果是______。includeinclude usingnamespacestd;classY 以下程序运行后的输出结果是______。include <iostream>include <string>using namespace std;class Y;class X{int x;char *strx;public:X(int a, char *str){x=a;strx=new char[strlen(str)+1]strcpy (strx,str);}void show(Y ob);};class Y{prlvate:int y;char *stry;public:Y(int b,char *str){y=b;stry=new char[strlen(str)+1];strcpy(stry,str);}friend void X::show(Y ob);};void X::show{Y ob){cout<<strx<<",",cout<<ob.stry<<endl;}int main{{X a (10, "stringX");Y b (20, "stringY");a. show (b);renurn 0;}

考题 以下程序的输出结果是()。include using namespace std;int main(){ int a=1,b; switc 以下程序的输出结果是( )。 #include <iostream> using namespace std; int main(){ int a=1,b; switch(a){ case 1:b=30; case 2:b=20; case 3:b=10; default:b=0; } cout<<b<<endl; return 0; }A.30B.20C.10D.0

考题 以下程序输出结果是 ______。includevoid fun(int x,int y,int z){z=x+y;}void main 以下程序输出结果是 ______。 #include<iostream.h> void fun(int x,int y,int z){z=x+y;} void main() { int a=10; fun (2,2,a); cout<<a; }A.0B.4C.10D.无定值

考题 下列程序的输出结果是______。 include main() {intx=10,y=10,i; for(i=0;x>8;y=++) pri 下列程序的输出结果是______。include<stdio.h>main(){ intx=10,y=10,i;for(i=0;x>8;y=++)printf("%d%d",X--,y);}

考题 有以下程序:include using namespace std;class sample{private: int x; static int 有以下程序:#include <iostream>using namespace std;class sample{private: int x; static int y;public: sample(int a); static void print(sample s);};sample:: sample(int a){ x=a; y+=x;}void sample:: print(sample s){ cout<<"x="<<s. x<<",y="<<y<<end1;}int sample:: y=0;int main(){ sample s1(10); sample s2(20); sample:: print(s2); return 0;}程序运行后的输出结果是( )。A.x=10,y=20B.x=20,y=30C.x=30,y=20D.x=30,y=30

考题 以下程序运行后的输出结果是【】。include main(){int i=10,j=0;do{j=j+ i; i--;}while 以下程序运行后的输出结果是【 】。include <iostream.h>main(){int i=10,j=0;do{j=j+ i; i--;}while(i>2);cout<<j;}

考题 有以下程序:includevoid main(){int x=10,y=10;for(int i=0;x>8;y=++i)cout 有以下程序: #include<iostream.h> void main() { int x=10,y=10; for(int i=0;x>8;y=++i) cout<<x--<<","<<y<<","; } 该程序运行后的输出结果是( )。A.10,1,9,2B.9,8,7,6C.10,9,9,0D.10,10,9,1

考题 以下程序运行后的输出结果是 ______。main(){int a,b,c; a=10;b=20;c=(a%b1); printf(“ 以下程序运行后的输出结果是 ______。 main() { int a,b,c; a=10;b=20;c=(a%b<1)||(a/b>1); printf(“%d %d %d\n",a,b,c); }A.10 20 0B.20 10 0C.10 10 0D.20 20 0

考题 以下程序执行后的输出结果是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.不确定

考题 以下程序的输出结果是includestruct st{ int x;int *y;}*p;int dt[4]={10,20,30,40};s 以下程序的输出结果是 #include<stdio.h> struct st { int x;int *y;}*p; int dt[4]={10,20,30,40}; struct st aa[4]={50,dt[0],60,dt[0],60,dt[0],60,dt[0],}; main() { p=aa; printf("%d\n",++(p->x));}A.10B.11C.51D.60

考题 若运行时给变量x输入12,则以下程序的运行结果是includevoid main(){int x,y;cin>>x 若运行时给变量x输入12,则以下程序的运行结果是 #include<iostream.h> void main() { int x,y; cin>>x; y=X>12?x+10:x-12; cout<<y; cout<<endl; }A.0B.22C.12D.10

考题 若运行时给变量x输入12,则以下程序的运行结果是include void main(){ int x,y; cin 若运行时给变量x输入12,则以下程序的运行结果是 #include <iostream.h> void main() { int x,y; cin>>x; y=x>12? x+10:x-12; cout<<y; cout<<endl; }A.0B.22C.12D.10

考题 以下程序输出的结果是()。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.运行错误