作业帮 > 综合 > 作业

有下函数定义:int fun(,double a ,double b)

来源:学生作业帮 编辑:灵鹊做题网作业帮 分类:综合作业 时间:2024/05/14 17:37:16
有下函数定义:int fun(,double a ,double b)
{ return a*b;
} 若下选项所用变量都正确定义并赋值错误函数调用时( )
A.if(fun(x,y)){.} B.z=fun(fun(x,y),fun(x,y));
C.z=fun(fun(x,y)*x,y) ; D.fun(x,y);
有下函数定义:int fun(,double a ,double b)
问题叙述错误!
int fun(,double a ,double b)中,你确定有个逗号的?而且题目无停顿,都不知啥意思,咋解?
再问: int fun(double a ,double b)应该是这样的,我写错了;
再答: 选B。嵌套调用。 函数int fun(double a ,double b)的返回值是a与b的乘积,然后取整。在B中。实则是 int fun(int x, int y)的调用