单选题
已知函数fun的原型为 int fun(int,int,int); 下列重载函数原型中错误的是( )。
A、
char fun(int,int);
B、
double fun(int,int,double);
C、
int fun(int,char*);
D、
float fun(int,int,int);
【正确答案】
D
【答案解析】
解析:重载函数至少要在参数个数或参数类型上不同。而选项D中的函数与原函数只是函数类型不同,而其他完全相同(参数个数及类型),则不能作为重载函数来使用。
提交答案
关闭