下列程序的运行结果是main( ){int a=2,c=5;cout<<"a="<<a<<"b="<<c<<endl;}A.a=% b=%5B.a=2 b=5C.a=d b=dD.a=%d b=%d

下列程序的运行结果是

main( )

{int a=2,c=5;

cout<<"a="<<a<<"b="<<c<<endl;

}

A.a=% b=%5

B.a=2 b=5

C.a=d b=d

D.a=%d b=%d


相关考题:

下面程序的运行结果是 include void fun(int * a,int * b) { int x= * a; * a= * 下面程序的运行结果是#include<iostream.h>void fun(int * a,int * b){int x= * a;* a= * b; * b=X;cout < < * a < < * b < <" ";}void main( ){int x=1,y=2;fun(x,y) ;cout < < X < < y < < endl;}A.12 12B.12 21C.21 12D.21 21

下列程序的运行结果是inClUdeclass Location{private:int X,Y;pubhc:void init(int 下列程序的运行结果是 #inClUde<iostream.h> class Location{ private: int X,Y; pubhc: void init(int=0,int=0) ; void valueX(int val) {X=val;} int valueX( ) {retum X;} void valueY(int val) {Y=val;} int valueY( ) {retum Y;}};void Location: :init(int initX,int initY) { X=initX; Y=initY;} Void main( ) { Location A,B; A. init( ) ; A. valueX(5) ; cout < < A. valueX( ) < < endl < < A. valueY( ) < < endl; B. init(6,2) ; B. valueY(4) ; cout < < B. valueX( ) < < endl < < B. valueY( ) < < endl;}A.5B.0C.5D.0 0 0 0 0 6 6 6 6 4 4 2 2

下列程序的运行结果是 includeclassLocation{ private: int X,Y; public: void init 下列程序的运行结果是 #include<iostram.h> classLocation{ private: int X,Y; public: void init(int=0, int=0) ; void valueX(int val){X=val:} int valueX(){return X;} void valueY(int val){Y=val;} int valueY(){returnY;}}; void Location∷init(int initX,int initY) { X=initX; Y=initY;} void main() { LocationA,B; A.init(); A.ValueX(5); cout <<A.ValUeX() <<endl<<A,valueY() <<endl; B.init(6,2); B.valueY(4) ; cout<<B.valueX() <<endl<<B.valueY() <<endl;}A.5 0 6 4B.0 0 6 4C.5 0 6 2D.0 0 6 2

下列程序的运行结果是______。A.a=%2,b=%5B.a=2,b=5C.a=d,b=dD.a=%d,b=%d main() { int a=2,c=5; pfintf("a=%d,b=%d\n”,a,c); }

下列程序的运行结果是 main() {int a=2,c=5; cout<<"a="<<a<<"b="<<c<<endl }A.a=%2,b=%5B.a=2,b=5C.a=d,b=dD.a=%d,b=%d

下列程序的运行结果是______。include int Func(int *a,int n) {int s=1; for(int i=0 下列程序的运行结果是______。include<iomanip.h>int Func(int *a,int n){int s=1;for(int i=0;i<n;i++)s*=*a++;returns;}void main(){inta[]:{1,2,3,4,5,6,7,8};intb=Func(a,6)+Func(a[5],2);cout<<“b=“<(b<<endl;}

设有以下程序,程序输出结果是() #include <stdio.h> main() { int a=2,b=5; printf("a=%%d,b=%%d",a,b); }A.a=%2,b=%5B.a=2,b=5C.a=%%d,b=%%dD.a=%d,b=%d

下列程序的运行结果是()。 main() { int a=2,c=5; printf("a=%d,b=%dn",a,c); }A.a=%2,b=%5B.a=2,b=5C.a=d, b=dD.a=%d,b=%d

【单选题】下列程序的运行结果是() 。 #include <stdio.h> main() { int a=2,c=5; printf("a=%d,b=%dn",a,c); }A.a=%2,b=%5B.a=2,b=5C.a=d, b=dD.a=%d,b=%d