填空题

表达式c3=c1.operator+(c2)或c3=operator+(c1,c2)还可以表示为 【9】 。

【参考答案】

c3=c1+c2
<上一题 目录 下一题>
热门 试题

填空题
下面程序运行时输出结果为 【8】 。 #include<iostream.h> #include<malloc.h> class Rect public: Rect(int1,int w)(length=1;width=w;) void Print()cout<< Area: <<length *width<<endl;) void *operator new(size-t size)return malloc(size); void operator delete(void *p)free(p) private: int length,width; ; void main() Rect*p; p=new Rect(5,4); p->Print(); delete p;
填空题
以下程序的执行结果是 【11】 。 #include<iostream.h> int f(int b[],int n) int i,r=1; for(i=0;i<n;i++) r=r*b[i]; return r; void main() int x,a[]=2,3,4,5,6,7,8,9; x=f(a,3); cout<<x<<endl;
相关试题
  • 下列程序将x、y和z按从小到大的顺序排列,...