填空题

诊断和改正程序中错误的工作通常称为______。

【参考答案】

程序调试
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序对一维坐标点类Point进行了运算符重载: #include <iostream> using namespace std; class Point{ public: Point(int val){x=val;} Point& operator++( ){x++;return*this;} Point operator++(int){Point old=*this;++(*this);return old;} int GetX( )eonst t return x;} private: int x; }; int main( ){ Point a(10); cout<<(++A) .GetX( ); cout<<a++.GetX( ); return 0; } 编译和运行情况是
A.运行时输出1011
B.运行时输出1111
C.运行时输出1112
D.编译有错
单项选择题
有如下程序: #include <iostream> using namespace std; class Sample{ friend long fun(Sample s); public: Sample(long A) {x=a;} private: long x; }; long fun(Sample s){ if(s.x<2)return 1; return s.x*fun(Sample(s.x-1)); } int main( ){ int sunl=0; for(inti=0;i<6;i++)sum+=fun(Sample(i)); tout<<sum: return 0; } 程序的输出结果是
A.120
B.16
C.154
D.34
相关试题
  • 空格
  • 下列程序的输出结果为: Ohject id=0 ...
  • 如下程序声明了一个使用两个通用数据类型的...
  • public A
  • Date