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

题目内容 (请给出正确答案)
有如下程序:includevoid main(){int x=2,y=3,a,b,c,d;a=(x++>=--y);b=(x==++y);c=(x

有如下程序:

include<iostream.h>

void main()

{

int x=2,y=3,a,b,c,d;

a=(x++>=--y);

b=(x==++y);

c=(x--!=y);

d=(++x>y--);

Cout<<a<<b<<c<<d<<end1;

}

则程序执行后变量a,b,c,d的值分别是【 】。


参考答案

更多 “ 有如下程序:includevoid main(){int x=2,y=3,a,b,c,d;a=(x++>=--y);b=(x==++y);c=(x 有如下程序:include<iostream.h>void main(){int x=2,y=3,a,b,c,d;a=(x++>=--y);b=(x==++y);c=(x--!=y);d=(++x>y--);Cout<<a<<b<<c<<d<<end1;}则程序执行后变量a,b,c,d的值分别是【 】。 ” 相关考题
考题 有以下程序: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

考题 下面程序的运行结果是()。includeclass Sample{int x, y;public:Sample() { x=y=0; 下面程序的运行结果是( )。#include<iostream.h>class Sample{int x, y;public:Sample() { x=y=0; }Sample(int a, int b) { x=a; y=b; }void (lisp(){cout<<"x="<<x<<",y="<<y<<end1;}};void main(){Sample s(2,3), *p=s;p->disp();}A.x=1, y=2B.x=2, y=4C.x=2, y=3D.x=4, y=3

考题 以下程序的输出结果是 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 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

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

考题 下列程序的执行结果是( )。 #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

考题 下列程序段的输出结果是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

考题 下列程序段的输出结果是 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