未分类题

若下列程序运行时输出结果为
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,double c)
{
cout<<a<<','<<b<<','<<c<<end1;
}

A.1
B.5
C.1);

【参考答案】

=3.5
=3.5 解析:本题考查了函数默认参数的应用。本题中第一次调用 rest()函数数值1,A,10.1;......

(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)