网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

有下列函数定义: 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) {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); ” 相关考题
考题 若各选项中所用变量已正确定义,函数 fun 中通过 return 语句返回一个函数值,以下选项中错误的程序是A)main(){ …… x=fun(2,10); …… }float fun(int a,int b){ …… }B)float fun(int a,int b){ …… }main(){ …… x=fun(i,j); …… }C)float fun(int,int);main(){ …… x=fun(2,10); …… }float fun(int a,int b) { …… }D)main(){ float fun(int i,int j);…… x=fun(i,j); …… }float fun(int a,int b){ …… }

考题 若各选项中所用变量已正确定义,fun()函数中通过return语句返回一个函数值,下列选项中错误的程序是( )。A.main() {……x=fun(2,10);……} float fun(int a,int b){……}B.float fun(int a,int b){……} main() {……x=fun(i,j);……}C.float fun(int,int); main() {……x=fun(2,10);……} float fun(int a,int b){……}D.main() {float fun(int I,intj); ……x=fun(i,j);……} float fun(int a,int b){……}

考题 若各选项中所用变量己正确定义,fun()函数中通过return语句返回一个函数值,下列选项中错误的程序是( )。A.main() <……x=fun(2,10);……} float fun(int a,int b) {……}B.float fun(int a,int b) {……} main() {……x=fun(i,j);……}C.float fun(int,int); main() <……x=fun(2,10);……} float fun(int a,int B) {……}D.main() <float fun(int I,intj); ……x=fun(i,j);……} float fun(int a,int b) {……}

考题 在类A中定义了方法fun(double,int),类B继承自类A,并定义了函数fun(double),这种方式称为(46)。若B中重新定义函数fun(double,int)的函数体,这种方式称为(47)。(62)A.重置B.重载C.代理D.委托

考题 若各选项中所用变量已正确定义,函数fun中通过return语句返回一个函数值,以下选项中错误的程序是A.AB.BC.CD.D

考题 有下列函数定义: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);

考题 若各选项中所用变量已正确定义,函数fun中通过return语句返回一个函数值,以下选项中错误的程序是()。A.int main() {…… x=fun(2,10); ……} float fun(int a,int b){……}B.float fun(int a,int b){……} int main() {…… x=fun(i,j); ……}C.float fun(int,int); int main() {…… x=fun(2,10); ……} float fun(int a,int b){……}D.int main() {float fun(int i,int j); …… x=fun(i,j); ……} float fun(int a,int b){……}

考题 若主函数有变量定义:int x=1 ; double y=2.3 ; 且有合法的函数调用语句f (y , x); 则下列关于函数f的原型声明中一定错误的是 。A.void f(double, int);B.int f(int , int);C.int f(double, double);D.void f(double, int, int);

考题 若同时定义了下列四个选项格式的函数和模板,fun(8,3.1)调用的是()A.template<class T1,class T2)fun(T1,T2)B.fun(double,int)C.fun(double,int)D.fun(double,char)