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

题目内容 (请给出正确答案)
对于下面的程序,说法正确的是 include void main( ) {int x=3,y=4,z=2; i

对于下面的程序,说法正确的是 #include<iostream.h> void main( ) { int x=3,y=4,z=2; if(X=y+z) cout <<"x=y+Z"; else cout<<"x!=y+Z";}

A.不能通过编译

B.输出6

C.输出x! =y+z

D.输出x=y+z


参考答案

更多 “ 对于下面的程序,说法正确的是 include void main( ) {int x=3,y=4,z=2; i 对于下面的程序,说法正确的是 #include<iostream.h> void main( ) { int x=3,y=4,z=2; if(X=y+z) cout <<"x=y+Z"; else cout<<"x!=y+Z";}A.不能通过编译B.输出6C.输出x! =y+zD.输出x=y+z ” 相关考题
考题 以下程序段的执行结果为()。includedefinePLUS(x,y)x+yvoid main (){int x=1,y=2, 以下程序段的执行结果为( )。 #include< iostream.h> #definePLUS(x,y) x+y void main () {int x=1,y=2,Z=3,sum: sum=PLUS (x+y,Z) * PLUS (y,Z): cout<<"SUM="<<sum; cout<<endl:}A.SUM=9B.SUM=12C.SUM=18D.SUM=30

考题 以下程序段的执行结果为 include define PLUS(X,Y)X+Y void main( ) { int x= 以下程序段的执行结果为 #include<iostream.h> #define PLUS(X,Y)X+Y void main( ) { int x=1,y=2,z=3,sum; sum=PLUS(x+y,z) * PLUS(y,z); cout < <"SUM=" < < sum; cout< <end1;}A.SUM=9B.SUM=12C.SUM=18D.SUM=30

考题 以下程序运行后的输出结果是【】。 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 void main() { int x=5 y=2; cout 以下程序的执行结果是______。include<iostream.h>void main(){int x=5 y=2;cout<<! (y==x/2)<<",";cout<<(y!=x%3)<<",";cout<<(x>0 y<0=<<",";cout<<(x!=y||x>=y)<<endl;}

考题 下面程序的结果【】。 include int f(int); void main() { int x=1,i; for (i=0; i 下面程序的结果【 】。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=3y++;z++;return (x+y+z);}

考题 以下程序的运行结果是()。includevoid sub(int x,int y,int*z){*Z=y-x;}void main() 以下程序的运行结果是( )。 #include<iostream.h> void sub(int x,int y,int*z) {*Z=y-x;} void main() {int a,b,c; sub(10,5,a); sub(7,a,b); sub(a,b,c); cout<<a<<“,”<<b<<“,”<<c<<endl;}A.5,2,3B.-5,-12,-7C.-5,-12,-17D.5,-2,-7

考题 下面程序的运行结果是______。 include void fun(int a,int b=3) { static int 下面程序的运行结果是______。include<iostream.h>void fun(int a,int b=3){static int i=2;a=a+b+i;i=i+a;}void main(){int x=5,y=2;fun(x,y);cout<<x<<",";fun(x);cout<<x<<endl;}

考题 下面程序的运行结果为_____。 include void fun(int x=0,int y=0) { cout 下面程序的运行结果为_____。include<iostream.h>void fun(int x=0,int y=0){cout < < x < < y;}void main( ){fun(5) ;}

考题 以下程序的运行结果是include void sub(int x,int y,int *z){*z=y-x;}void main( ) 以下程序的运行结果是 #include<iostream.h> void sub(int x,int y,int *z) { *z=y-x;} void main( ) { int a,b,c; sub(10,5,a) ; sub(7,a,b) ; sub(a,b,c) ; cout << a <<","<< b <<"," << c << enA.5,2,3B.-5,-12,-7C.-5,-12,-17D.5,-2,-7

考题 有以下程序:includevoid fun(int a, int b, int c){a=456,b=567,c=678;}void main( 有以下程序: #include<iostream.h> void fun(int a, int b, int c) { a=456,b=567,c=678;} void main( ) { int x=10,y=20,z=30; fun(x, y, z) ; cout < < x< < ',' < < y < < ',' < < z < < endl; } 输出结果是A.30,20,10B.10,20,30C.456,567,678D.678,567,456

考题 有如下程序:includeint func(int a, int b){return(a+b) ;}void main( ){int x=2,y 有如下程序: #include<iostream.h> int func(int a, int b) { return(a+b) ;} void main( ) { int x=2,y=5,z=8,r; r=func(func(x,y) ,z) ; cout < < r; } 该程序的输出的结果是A.12B.13C.14D.15

考题 已知程序的结果为1 2 3,请填空。 include template class A { public: T X, 已知程序的结果为1 2 3,请填空。include<iostream.h>template<class T>class A{public:T X, y, z;void display( ) {cout < < x < < " " < < y < < " " < < z;}};void main( ){A<int>a1;_______________a1.display( ) ;}

考题 以下程序的输出结果是 include void main( ) {int x=1,y=3; cout 以下程序的输出结果是#include<iostream.h>void main( ){int x=1,y=3;cout < < x++ < < ",";{int x=0;x+=y * 2;cout < < x < <"," < < y < <",";}cout < < x < < "," < < y;}A.1,6,3,1,3B.1,6,3,6,3C.1,6,3,2,3D.1,7,3,2,3

考题 下列程序段的输出结果是includevoid fun(int * x,int * y){cout 下列程序段的输出结果是 #include<iostream.h> void fun(int * x,int * y) { cout << * X << * y; *X=3; *y=4; } void main() { int x=1,y=2; fun(y,x); cout << X << y<<endl; {A.2143B.1212C.1234D.2112

考题 以下程序输出结果是 ______。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 void sub(int x,int y,int*z){*z=y-x;}void main(){i 以下程序的运行结果是 #include<iostream.h> void sub(int x,int y,int*z) { *z=y-x;} void main() { int a,b,c; sub(10,5,a); sub(7,a,b); sub(a,b,c); cout << a <<","<< b<<"," << C << endl;}A.5,2,3B.-5,-12,-7C.-5,-12,-17D.5,-2,-7

考题 下列程序的执行结果是( )。 #inClude<iostream.h) #include(stdlib.h) class TestClass { public: int x,y; TestClass(){x=y=0;} TestClass(int a,int b){x=a;y=b;} void disp() { cout<<"x="<<x<<",y="<<y<<endl; } }; void main() {A.x=2,y=2B.x=2,y=3C.x=3,y=2D.x=3,y=3

考题 阅读下面程序:include fun (int a, int b){int c;c=a+b;return c;}void main(){int 阅读下面程序:#include <iostream.h>fun (int a, int b){int c;c=a+b;return c;}void main(){int x=6, y=7, z=8, r;r=fun( (x--, y++, x+y), z--);cout<<r<<end1;}则该程序的输出结果是( )。A.11B.20C.21D.31

考题 以下程序的输出的结果是()。include int x=3;void main(){void incre();int i;for ( 以下程序的输出的结果是( )。#include <iostream.h>int x=3;void main(){ void incre(); int i; for (i=1;i<x;i++) incre();}Void incre(){ static int x=1; x*=x+1; cout<<x<<"";}A.3 3B.2 2C.2 6D.2 5

考题 下列程序的运行结果是( )。 include voidfun(int a,int b=3) { s 下列程序的运行结果是( )。 #include<iostream.h> voidfun(int a,int b=3) { static int i=2; a=a+b+i; i=i+a; } void main() { int x=5,y=2; fun(x,y); cout<<x<<","; fun(x); cout<<x<<endl; }A.5,2B.7,11C.11,23D.9,23

考题 下列程序运行后的输出结果是()。includevoid fun(int,int,int*);void main(){int x, 下列程序运行后的输出结果是( )。 #include<iostream.h> void fun(int,int,int*); void main() { int x,y,z; fun(5,6,x); fun(7,x,y); fun(x,y,z); cout<<x<<","<<y<<","<<z<<endl; } void fun(int a,int b,int *c) { b+=a; *c=b-a; }A.5,5,5B.6,6,6C.5,6,7D.7,7,7

考题 下列程序的运行结果是()。 include void fun(int a,int b=3) { static int i=2 下列程序的运行结果是( )。 #include<iostream.h> void fun(int a,int b=3) { static int i=2; a=a+b+i; i=i+a; } void main() { int x=5,y=2; fun(x,y); cout<<x<<","; fun(x); cout<<x<<endA.5,2B.7,11C.11,23D.9,23

考题 下列程序运行后的输出结果是()。 include void fun(int,int,int*); void main() { i 下列程序运行后的输出结果是( )。 #include<iostream.h> void fun(int,int,int*); void main() { int x,y,z; fun(5,6,x); fun(7,x,y); fun(x,y,z); cout<<x<<","<<y<<","<<z<<end1; } void fun(int a,int b,int *c) { b+=a; *c=b-a; }A.5, 5, 5B.6, 6, 6C.5, 6, 7D.7, 7, 7

考题 下列程序段的输出结果是 include void fun(int * X,int * y) {cout 下列程序段的输出结果是 #include<iostream.h> void fun(int * X,int * y) { cout < < * X < < * y; * X=3; * y=4; } void main( ) { int x=1,y=2; fun(y,x); cout < < X < < y < < end1; }A.2143B.1212C.1234D.2112

考题 下面程序的输出结果是()。includevoid main(){int x=-1,y=5,z;z=(x++ 下面程序的输出结果是( )。#include<iostream.h>void main(){int x=-1,y=5,z;z=(x++<0) (y-->=0);cout<<x<<'\t'<<y<<'\t'<<z<<end1;}A.-1 5 0B.-1 4 1C.0 4 1D.0 4 0

考题 有以下程序includevoid fun(int a,int b,int c){a=456,b=567,c=678;}void main(){ 有以下程序 #include<iostream.h> void fun(int a,int b,int c) {a=456,b=567,c=678;} void main() { int x=10,y=20,z=30; fun(x,y,2); cout << X < < ‘,’ < < y < < ‘,’ < < z < < endl; } 输出结果是A.30,20,10B.10,20,30C.456,567,678D.678,567,456

考题 下列程序的输出结果是______。 include class base { int x,y; public: base(int i,i 下列程序的输出结果是______。include<iostream.h>class base{int x,y;public:base(int i,int j){x=i;y=j;}virtual int add( ){return x+y;}};class three:public base{int z;public:three(int i,int j,int k):base(i,j){z=k;)int add( ){return(base::add( )+z);}};void main( ){three*q=new three(10,20,30);cout<<q->add( )<<endl;}