网站首页
财会类
职业资格
公务员
医卫类
建筑工程
计算机
学历类
职业技能鉴定
其它
当前位置:
首页
>
计算机
>
计算机二级
>
( 6 )有如下程序段:int x=1,Y=2,z=3;x=x^z;y=y^z;z=x^y;cout$amp;执行这个程
问题
( 6 )有如下程序段:
int x=1,Y=2,z=3;
x=x^z;
y=y^z;
z=x^y;
cout$amp;执行这个程序段的输出是【 6 】 。
参考答案
您可能感兴趣的试题
( 7 )有如下程序段:fer ( int i=1; i<=50;i++ ) {if ( i%3 != 0 )continue;elseif ( i%5!=0 )continue;tout$amp;}
答案解析
( 8 )有如下程序段:Char c [20]=examination ;c[4]=0;cout$amp;执行这个程序段的输出是【 8 】 。
答案解析
( 9 )下面的函数利用递归实现了求 1+2+3+ …… +n 的功能:int sum ( int n ) {if ( n==0 )return 0;elsereturn n+sum ( n-1 )
答案解析
( 10 )非成员函数应该声明为类【 10 】函数才能访问该类的私有成员。
答案解析
( 11 )有如下程序:#includeusing namespace std;class Monitor{public:Monitor ( char t ) : type ( t
答案解析
( 12 )有如下程序:#include using namespace stdclass Animal{public:virtual char* getType () const
答案解析
相关内容
( 35 )有如下程序:#includeusing namespace std;class ONE{int c;public:ONE ( ) : c ( 0 ) {cout$amp
( 34 )假定下列语句都是程序运行后首次执行的输出语句,其中输出结果与另外三条语句不同的语句是A ) cout$amp;B ) cout$amp;C ) cout$amp;D ) cout$amp;
( 33 )有如下程序:#includeusing namespace std;class Pair{int m;int n;public:Pair ( int i , int j
( 32 )有如下程序:#includeUsing namespace std;class A{public:virtual void f () {cout+1;}void g (
( 31 )有如下类定义:class XX{int xx;public:XX ( ) : xx ( 0 ) {cout$amp;XX ( int n ) : xx ( n ) {tout$amp;};
( 30 )有如下程序:#includeusing namespace std;class AA{lilt k;protected:int n;void setK ( int k
( 29 )已知类 MyClass 声明如下:class MyClass{int n;public;MyClass ( int k ) : n ( k ) {}int getValue () cons
( 28 )有如下程序:#include#includeusing namespace std;class XCF{int a;public:XCF ( int
( 27 )有如下程序:#include#includeusing namespace std;class XCD{char* a;int b;public:XC
( 26 )当使用 ifstream 流类定义一个流对象并打开一个磁盘文件时,文件的默认打开方式为A ) ios_base::inB ) ios_base::in|ios_base::outC ) i