填空题

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

【参考答案】

0,0,0,1
<上一题 目录 下一题>
热门 试题

单项选择题
有如下程序: #include<iostream> using namespace std; class XX{ protected; int k; public: XX(int n=5):k(n){} ~XX(){cout<< XX ;} Virtual void f()cons=0; }; inline void XX::f()const{cout<<k+3;} class YY:public XX{ public: ~YY(){cout<< YY ;} void f()const{out<<k-3;XX:f();} }; int main(){ XX &p:*new YY, p.f(); delete &p; return 0; }; 执行上面的程序将输出( )。
A.28XX
B.28YYXX
C.-33XX
D.-33XXYY
单项选择题
如果一个类至少有一个纯虚函数,那么就称该类为( )。
A.抽象类
B.虚基类
C.派生类
D.以上都不对
相关试题
  • 为了便于对照检查,测试用例应由输入数据和...
  • 类继承中,缺省的继承方式是 ______。
  • cerr与cout的差别在于:cerr是 _____...
  • 有如下程序:#include<iostream>using ...
  • 模板使我们可以用一个代码段指定一组相关函...