问题
填空题
若下面程序运行时输出结果为
1,A,10.1
2,B,3.5
请将程序补充完整。
#include<iostream>
using namespace std;
int main( )
void test(int,char,double______);
test(1,’A’,10.1);
test(2,’B’);
return 0;
void test(int a,char b,doubleC) cout<<a<<’,’<<b<<’,’<<c<<endl;
答案
参考答案:E
解析: 为函数的参数设置默认值,根据题干,要打印2、B、3.5,则第三个参数的默认值该为3.5。故应该填“=3.5”。