DOS命令 "COPY CON DISP"中的CON代表( )。

A:子目录 B:磁盘文件 C:键盘 D:显示器

有如下程序:   #include   usingnamespacestd;   classCon   charID;   public:   Con():ID(’A){cout<<1;}   Con(charID):ID(ID){eout<<2;}   Con(Con&c):ID(c.getID()){cout<<3;}   chargetID()corlst{returnID;}   };   voidshow(Conc)(cout<  intmain()   {   Conc1:   show(c1);   Conc2(’B’);   show(c2);   return0;   }   执行上面程序的输出是(  )。

A:13A23A B:23A13B C:13A23B D:13823A

有如下程序:
#include<iostream>
using namespace std;
class Con

char ID;
public:
Con( ):ID('A)cout<<1;
Con(char ID):ID(ID)cout<<2;
Con(Con &c):ID(c.getID( ))cout<<3;
char getID( )constreturn ID;

void show(Con c)cout<<c.getID( );
int main( )

Con c1;
show(c1);
Con c2('B');
show(c2);
return 0;

执行上面程序的输出是( )。

A:13A23A B:23A13B C:13A23B 13823A

有如下程序:
#include<iostream>
using namespace std;
Class Con

char ID;
public:
Con( ):ID(’A’)cout<<1;
Con(char ID) :ID(ID) cout<<2;
Con(Con& c):ID(c.getID( ))cout<<3;
char get1D( )constreturn ID;
;
void show(Con c)cout<<c.get1D( );
int main( )

Con c1;
show(c1);
Con c2(’B’);
show(c2);
return 0;

执行上面程序的输出是( )。

A:13A23A B:23A13B C:13A23B D:13B23A

有如下程序:
#include<iostream>
using namespace std;
class Con

char ID;
public:
Con( ):ID(’A’)cout<<1;
Con(char ID):ID(ID’)cout<<2;
Con(Con&c):ID(c.getID( ))cout<<3;
char getID( )constreturnID;

void show(Con c)tout(c.getID( );
int main( )

Con c1;
show(c1);
Con c2(’B’);
show(c2);
return 0;

执行上面程序的输出是( )。

A:13A23A B:23A13B C:13A23B D:13B23A

有如下程序:
#include<iostream>
using namespace std;
class Con

char ID;
public:
Con( ):ID(’A)cout<<1;
Con(char ID):ID(ID)cout<<2;
Con(Con &c):ID(c.getID( ))cout<<3;
char getID( )constreturn ID;

void show(Con c)cout<<c.getID( );
int main( )

Con c1;
show(c1);
Con c2(’B’);
show(c2);
return 0;

执行上面程序的输出是( )。

A:13A23A B:23A13B C:13A23B D:13823A

有如下程序: #include<iostream> using namespace std; Class Con { char ID; public: Con( ):ID(’A’){cout<<1;} Con(char ID) :ID(ID) {cout<<2;} Con(Con& c):ID(c.getID( )){cout<<3;} char get1D( )const{return ID;} }; void show(Con c){cout<<c.get1D( );} int main( ) { Con c1; show(c1); Con c2(’B’); show(c2); return 0; } 执行上面程序的输出是( )。

A:13A23A B:23A13B C:13A23B D:13B23A

有如下程序: #include<iostream> using namespace std; class Con { char ID; public: Con( ):ID(’A’){cout<<1;} Con(char ID):ID(ID’){cout<<2;} Con(Con&c):ID(c.getID( )){cout<<3;} char getID( )const{returnID;} }; void show(Con c){tout{(c.getID( );} int main( ) { Con c1; show(c1); Con c2(’B’); show(c2); return 0; } 执行上面程序的输出是( )。

A:13A23A B:23A13B C:13A23B D:13B23A

微信扫码获取答案解析
下载APP查看答案解析