下列程序的运行结果是 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

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

A.a=%2,b=%5

B.a=2,b=5

C.a=d,b=d

D.a=%d,b=%d


相关考题:

下面程序的运行结果是 include Void main( ) { int num=1; int ref=num;ref= 下面程序的运行结果是#include<iostream.h>Void main( ){int num=1;int ref=num;ref=ref+2;cout < < num;num=num+3;cout < < ref < <endl;}A.13B.16C.36D.33

下面程序的运行结果是 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

下列程序的运行结果为 include void main( ) { int a=2; int b=a+1; cout 下列程序的运行结果为#include<iostream.h>void main( ){int a=2;int b=a+1;cout < < a/b < < endl;}A.0.66667B.0C.0.7D.0.66666666…

下列程序的运行结果为【】。 include void main(void) {int a=2,b=-1,c=2; if(a 下列程序的运行结果为【 】。include<iostream.h>void main(void){int a=2,b=-1,c=2;if(a<b)if(b<0)c=0;else c=c+1;cout<<c<<endl;}

下面程序运行输出的结果是【】。 include using namespace std; int main(){char a[]="C 下面程序运行输出的结果是【 】。include <iostream>using namespace std;int main(){char a[]="Chinese";a[3]='\0';cout<<a<<endl;return 0;}

以下程序的执行结果是______。 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 using namespace std; int main() {int data=l; 下列程序的输出结果是______。include<iostream>using namespace std;int main(){int data=l;int r = data;data+=5;r+=5;cout<<data<<endl;return 0;}

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

下列程序的输出结果是()。ificludeusing namespace std;int main(){cout.fill('*');co 下列程序的输出结果是( )。 #ificlude<iostream> using namespace std; int main() { cout.fill('*'); cout.width(5); cout<<oct<<100<<endl; return 0; }A.**100B.**144C.100**D.144**

下面程序的运行结果是______。 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;}

下列程序的运行结果是()。includeclass A{inta;public:A( ){a=0;}A(int aa){a=aa;co 下列程序的运行结果是( )。 #include<iostream.h> class A { inta; public: A( ){a=0; } A(int aa) { a=aa; cout<<a++; } }; void main() { A x,y (2),z (3): cout<<endl; }A.0B.23C.34D.25

下列程序的运行结果是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

下列程序的运行结果是______。include class Base { public: void f(int x){cout 下列程序的运行结果是______。include<iostream.h>class Base{public:void f(int x){cout<<“Base:”<<x<<endl;});class Derived:public Base{public:void f(char*str){cout<<“Derived:”<<str<<endl;}};void main(void){Base*pd=ne

以下程序的输出结果是_____。 include void fun( ) {static int a=0; a+=2;cout 以下程序的输出结果是_____。include<iostream.h>void fun( ){ static int a=0;a+=2;cout < < a < < " ";}void main( ){ int cc;for(cc=1;cc<4;cc++)fun( ) ;cout < < endl;}

下列程序的运行结果是 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

以下程序的正确运行结果是()。includeint f(int);void main(){int a=2,i;for(i=0;i 以下程序的正确运行结果是( )。 #include<iostream.h> int f(int); void main() { int a=2,i; for(i=0;i<3;i++)cout<<f(a)<<" "; cout<<endl; } int f(int a) { int b=0; static int c=3; b++;c++; return(a+b+c); }A.777B.7 10 13C.7 9 11D.7 8 9

下列程序的运行结果是()。includeclassA{int a;public:A(){a=0;}A(){int aa}{a=aa;c 下列程序的运行结果是( )。 #include<iostream.h> classA { int a; public: A(){a=0;} A(){int aa} {a=aa; cout<<a++; } }; Void main() { A x,y(2),z(3); cout<<endl; }A.00B.23C.34D.25

下列程序的运行结果是 include class A { int a; public: A( ) {a=0;}A(int aa) { 下列程序的运行结果是#include<iostream.h>class A{int a;public:A( ) {a=0;}A(int aa){a=aa;cout < < a++;}};void main( )A x,y(2) ,z(3) ;cout < < endl;}A.00B.23C.34D.25

下列程序的运行结果是()。 include class A { inta; public: A(){a=0:} A(int aa) { 下列程序的运行结果是( )。 #include<iostream.h> class A { inta; public: A(){a=0:} A(int aa) { a=aa; cout<<a++; } }; void main() { A x,y(2),z(3); cout<<endl; }A.0B.23C.34D.25

下列程序的输出结果是【】。 include void main() { int i(1),j(2),k(3),a(10); if(!i 下列程序的输出结果是【 】。include<iostream.h>void main(){int i(1),j(2),k(3),a(10);if(!i)a--;else if(j)if(k)a=5;elsea=6;a++;cout<<a<<endl;if(i<j)if(i!=3)if(!k)a=1;else if(k)a=5;6+=2;cout<<a<<endl;

下列程序的输出结果是【】。 include using namespace std; int main(){ int i=3; int r=i; r=5;cout<<i<<endl;return 0;}

下列程序的运行结果是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=5,b=4,c=3,d=2;if(a>b>c)cout<<d<<endl;else if((c-1=d)==1)cout<<d+1<<endl;elsecout<<d+2<<endl;}执行后输出结果是A.2B.3C.4D.编译时有错,无结果

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

有如下程序:includeusing namespace std;int main(){cout.fill('*');cout.width(5);c 有如下程序: #include<iostream> using namespace std; int main() { cout.fill('*'); cout.width(5); cout<<scientific<<314.15926535<<endl; return 0; } 程序运行后,输出的结果是( )。A.3.141593e+002B.3.1416e+002C.**3.14e+002D.314.16

下面程序的输出结果是______。include void main() { inta[6]={1,2,3,4,5,6}; for(in 下面程序的输出结果是______。include<iostream.h>void main(){inta[6]={1,2,3,4,5,6};for(int i=0;i<5;i++)cout<<a[i]<<““;cout<<endl;

下列程序的运行结果是______。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;}