执行以下语句的结果为______。 int x=3,y;int*px=x;y=*px++;A.x=3,y=4B.x=3,y=3C.x=4,y=4D.x=3,y不知

执行以下语句的结果为______。 int x=3,y;int*px=&x;y=*px++;

A.x=3,y=4

B.x=3,y=3

C.x=4,y=4

D.x=3,y不知


相关考题:

有以下程序,其输出结果是( )。void main(){ floar x=1; int y; x++; y=x+1; printf("x=%d,y=%f",x,y);}A.x=2,y=3B.x=2,y=3.0C.x=2.0,y=3D.x=0,y=0.000000

执行以下程序,输出结果的最后一行语句是______。 include class Sample { int x,y; 执行以下程序,输出结果的最后一行语句是______。include <iostream.h>class Sample{int x,y;public:Sample(){x=y=0;}Sample(int a,int b){x=a;y=b;}~Sample(){if(x==y)cout<<"x!=y"<<end1;elsecout<<"x!=y"<<end1;}void disp(){cout<<"x="<<x<<",y="<<y<<end1;}};void main(){Sample s1(2,3);s1.disp();}

执行以下程序段后,变量x=______,y______。int x=5;int y=0;y = --x * 3;

下面程序的输出结果是 ( )main( ){ int x,y,z;x=0,y=z=-1;x+=-z- - -y;pritnf("x=%d\n",x);}A.x=4B.x=0C.x=2D.x=3

下列程序的执行结果是()。includeclass Sample{int x,y;public:Sample(){x=y=0;)Sam 下列程序的执行结果是( )。 #include<iostream.h> class Sample { int x,y; public: Sample(){x=y=0;) Sample(int a,int b){x=a;y=b;} ~Sample() { if=(x==y) cout<<“x=y”<<endl; else cout<<“x!=y”<<endl; } void disp() { coutA.x=2,y=2B.x=3,y=3C.x=2,y=3D.x=3,y=2

设x,y,t均为int型变量,执行语句:x=y=3;t=++x||++y;完成后,y的值为A.不确定B.4C.3D.1

有以下程序void f( int y, int *x){ y=y+*x; *X=*X+y; }main(){ int x=2,y=4;f(y,x);printf("%d %d\n",x,y);}执行后输出结果是______。

以下程序运行后的输出结果是【】。 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;}

下列程序执行后,屏幕的输出是()。includeusing namespace std;void swap(int x,int y) 下列程序执行后,屏幕的输出是( )。 #include<iostream> using namespace std; void swap(int x,int y) { int temp=x; x=y; y=temp; cout<<"x="<<x<<"",y=""<<y<<end1; } int main() { int x=3,y=2; swap(x,y); cout<<"x="<<x<<",y="<<y<<end1; return 0; }A.x=3,y=2 x=3,y=2B.x=2,y=3 x=3,y=2C.x=2,y=3 x=2,y=3D. x=3,y=2 x=2,y=3

下列程序的执行结果是( )。 include include Class TestClass 下列程序的执行结果是( )。 #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<<end1; } }; void main() { TestClass s1(2,3); s1.disp(); }A.x=2,y=2B.x=3,y=3C.x=2,y=3D.x=3,y=2

设x、y、t均为int型变量,执行以下语句后,y的值为______。x=y=3;t=++x||++y;A.不定值B.4C.3D.1

下面程序的运行结果是()。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 class Location { protected: int X,Y; 下列程序的运行结果为 #include<iostream.h> class Location { protected: int X,Y; publiC: void SeX(int myx){X=myx;} void SetY(int myy){Y=myy;} void showxy( ) {cout<<"X=" <<X<<" " <<"Y"=<< Y<< endl;} }; Class Rectangle :public Location{A.X=3 Y=5 X=3 Y=5 H=4 W=6B.X=3 Y=5 X=3 Y=5 H=3 W=6C.X=3 Y=5 X=3 Y=4 H=4 W=6D.X=3 Y=5 X=3 Y=3 H=4 W=6

设int x=10,y=3,z;,以下语句的输出结果是______。printf("%d\n",z=(x%y,x/y));A.1B.0C.4D.3

下列程序的输出结果是includeclass Myclass{public:Myclass(int i=0,int j=0){x=i; 下列程序的输出结果是 #include<iostream.h> class Myclass{ public:Myclass(int i=0,int j=0) { x=i; y=j; } void show( ) {cout < <"x=" < < x < <" " <"y=" < < y < < endl;} void show( ) const{cout < <"x=" < <" " < <"y=" < < y < < endl;} privated: int x; int y; }; void main( ) { Myclass my1(3,4) ; const my2(7,8) ; my1.show( ) ;my2.show( ) ;}A.x=4,y=3;x=7,y=8B.x=3,y=4;x=7,y=8C.x=7,y=8;x=4,y=3D.x=8,y=7;x=7,y=8

下列程序的输出结果是includeclass Myclass{public : Myclass( int i=0,int j=0){x 下列程序的输出结果是 #include<iostream.h> class Myclass{ public : Myclass( int i=0,int j=0) {x=i; y=j; } void show( ){cout<<"x="<<x<<" "<"y="<<y<<endl;} void show( )const{cout<<"x="<A.x=4,y=3;x=7,y=8B.x=3,y=4;x=7,y=8C.x=7,y=8;x=4,y=3D.x=8,y=7;x=7,y=8

设x、y、t均为int型变量,则执行语句:x=y=3;t=++x||++y;后,y的值为( )。A.不定值B.4C.3D.1

下列程序的执行结果是()。 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;} ~Sample() { if(x==y) cout<<"x=y"<<end1; else cout<<"x!=y"<<end1; } void disp() { cout<<"x="<<x<<",y="<<y<<end1; } }; void main() { Sample s1(2,3); s1.disp(); }A.x=2,y=2B.x=3,y:3C.x=2,y=3D.x=3,y=2

执行以下语句后的输出结果是______。int x=3,y=0;printf("%d,%d”,-1>x>-101y> 执行以下语句后的输出结果是______。 int x=3,y=0; printf("%d,%d”,-1>x>-101<x<10,-1>y>-101<y<10);A.1 2B.1 1C.1 2D.2 2

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

下面程序的输出结果是 ( ) main( ) {int x,y,z; x=0;y=z=-1; x+=-z - - -y printf("x=%d\n",x); }A.x=4B.x=0C.x=2D.x=3

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

执行以下语句后的输出结果是______。int x=10,y=3,z;printf("%d\n",z=(x%y,x/y));A.1B.0C.4D.3

执行以下程序后的输出结果为( )。includeclass Sample{int x, y;public:Sample() { 执行以下程序后的输出结果为( )。#include<iostream. b>class Sample{ int x, y; public: Sample() { x=y=0;} Sample(int a, int b) {x=a; y=b; } void disp () { cout<<"x="<<x<<"y="<<y<<end1; }};void main(){ Sample s(2,3), *p=s; p->disp();}A.x=1, y=3B.x=2, y=4C.x=3, y=2D.x=2, y=3

下列程序的输出结果是includeclass Myclass{ public:My class(inti=0,int j=0) {x= 下列程序的输出结果是 #include<iostream.h> class Myclass{ public:My class(inti=0,int j=0) { x=i; y=j; } void show(){cout<<"x=" <<x<<" " <"y=" <<y<<endl;} void show()const{cout<<"x="<<""<<"y="<<y<<endl;} privated: int x; int y; }; void main() { Myclassmy1(3,4); const my2(7,8); myl.show();my2.show();}A.x=4,y=3;x=7,y=8B.x=3,y=4;X=7,y=8C.x=7,y=8;x=4,y=3D.x=8,y=7;x=7,y=8

设有如下类:class MyPoint {void myMethod() {int x, y;x = 5; y = 3;System.out.print( " ( " + x + ", " + y + " ) " );switchCoords( x, y );System.out.print( " ( " + x + ", " + y + " ) " );}void switchCoords( int x, int y ) {int temp;temp = x;x = y;y = temp;System.out.print( " ( " + x + ", " + y + " ) " );}}如果执行myMethod()方法,则输出结果为?A. (5, 3、(5, 3、(5, 3、B. (5, 3、(3, 5、(3, 5、C. (5, 3、(3, 5、(5, 3、