单项选择题

以下程序的输出结果是( )。
#include<iostream.h>
void main()
int i,j,x=0;
fof(i=0;i<2;i++=
x++;
for(j=0:j<3;j++=
if(j%2)continue;
x++;
x++;
cout<<"x="<<X;=

A.x=4
B.x=8
C.x=6
D.x=12
<上一题 目录 下一题>
热门 试题

单项选择题
有如下程序: #include<iostream> using namespace std; class XX protected; int k; public: XX(int n=5):k(n) ~XX()cout<< XX ; virtual void f()const=0; ; inline void XX::f()constcout<<k+3; class YY:public XX public: ~YY()cout<< YY ; void f()constout<<k-3;XX:f(); ; int main() XX &p=*new YY; p.f(); delete &p; return 0; ; 执行上面的程序将输出( )。
A.28XX
B.28YYXX
C.-33XX
D.-33XXYY
单项选择题
下面程序的结果为( )。 #include iostream.h void change(int a,int b) int temp; temp=a; a=b b=temp; void main() int m,n; m=8; n=9; change(m,n); cout<<m<< <<n<<endl;
A.89
B.98
C.程序有错误
D.99
相关试题
  • 为了便于对照检查,测试用例应由输入数据和...
  • cerr与cout的差别在于:cerr是______...
  • 模板使我们可以用一个代码段指定一组相关函...
  • 类继承中,缺省的继承方式是______。
  • operator是运算符重载时必须使用的关键字,...