填空题

下列程序的招待结果是 【14】 。
# include <iostream. h>
float temp;
float & fn2(float r) temp=r* r* 3.14;
return temp;void main( ) float a=fn2(5.0);
float& b=fn2(5.0)
b=20;
cout<<temp<<end1;

【参考答案】

T
<上一题 目录 下一题>
热门 试题

填空题
下列类的构造函数不能通过编译,正确的构造函数应该是 【15】 。# inelude<iostream. h>class Samplepublic: int ns const int con, Sample(int m) con= m+1; n= m; void disp() cout<<’ normal: n= <<n<<end1; void disp()const cout<< static: n= <<n<< end1; ;void main() const Sample a(12), Sample b(13), a. disp( ), b. disp() cout<<a, n<< <<b. con<<end1;
填空题
下列程序的输出结果为 【12】 。# include <iostream, h>void Func(char ch) switch (ch). case ’A’: case ’a’ cout<< 优秀 <<end1; case ’B’: case ’b’: cout<< 良好 <<end1; break; case ’C’: case ’c’: cout<< 及格 <<end1 break; default cout<< 不及格 <<end1; void main() char ch1 =’b’ Fune(chl); Func(’A’);
相关试题
  • 根据注释内容在空白处填写适当内容。class...