填空题
若下列程序运行时输出结果为
1,A,10.1
2,B,3.5
请将程序补充完整。
#include<iostream>
using namespace std;
int main()
void test(mt,char,double______);
test(1,’A’,10.1);
test(2,’B’);
return 0;
void test(int a,char b,double c)
cout<<a<<’,’<<b<<’,’<<c<<endl;
【参考答案】
=3.5。
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
下列程序的运行结果是______。 #include<iostream.h) class test private: int num; public: test(); int TEST()return num+100; ~test(); ; test::test()num=0; test::~test()cout<< Destructor is active <<endl; void main() test x[3]; cout<<x[1].TEST()<<end1;
点击查看答案&解析
填空题
根据输出结果填空完成下面程序。 #include<iostream.h> class Test private: static int val; int a; public: static int func() void sfunc(Test &r); ; ______ 初始化静态变量val Int Test::func() return val++; void Test::sfunc(Test &r) r.a=125; cout<< Resuh3= <<r.a; void main() cout<< Result1= <<Test::func()<<endl; Test A; tout<< Result2= <<A.rune()<<endl; A.sfunc(A); 输出结果为: Resuh1=201 Result2=202 Result3=125
点击查看答案&解析
相关试题
若有如下语句 #include<iostream.h) ...
有以下程序: #include<iostream.h> ...
下列程序的执行结果是( )。 #inClude...
下列程序的运行结果是( )。 #include...
下列程序输出的结果是( )。 #include...