网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有以下方法的定义,则该方法的返回类型为()。 ReturnType method(byte x, double y) { return (short) x/y*2; }
A.short
B.byte
C.double
D.int
参考答案和解析
D
更多 “有以下方法的定义,则该方法的返回类型为()。 ReturnType method(byte x, double y) { return (short) x/y*2; }A.shortB.byteC.doubleD.int” 相关考题
考题
以下程序的输出结果是______。 include int add(int x, int y) { return x+y; } doub
以下程序的输出结果是______。include<iostream.h>int add(int x, int y){return x+y;}double add(double x, double y){return x+y;}void main(){int a=3, b=3;double c=6.5, d=1.5;cout<<add(a, b)<<","<<add(c, d)<<end1;}
考题
有下列函数定义: 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);
考题
publicclassreturnIt(returnTypemethodA(bytex,doubley)(return(short)x/y*2;))WhatisthevalidreturnTypeformethodAinline2?()
A.IntB.ByteC.LongD.ShortE.FloatF.Double
考题
分析以下程序执行结果【】。 include int f (int x, int y){return x,y; } double f (d
分析以下程序执行结果【 】。include<iostream.h>int f (int x, int y){return x,y;}double f (double x, double y) {return x,y;}void main() {int a=4, b=6;double c=2.6, d=7.4;cout<<f (a, b) <<","<<f (c, d) <<end1;}
考题
有以下程序,请在 处填写正确语句。使程序可正常编译运行。include;mairl();{double x,y,(*p)():scanf(“%If%If”,x,y);P=avg;printf(“%f\n”,(*p)(x,y));}double avg(double a,doublc b){return((a十b/2):
考题
如已定义X和Y为double类型,则表达式X=1,y=x+5/2的值是( )。A.2B.3.0C.3SXB
如已定义X和Y为double类型,则表达式X=1,y=x+5/2的值是( )。A.2B.3.0C.3D.3.5
考题
有以下函数定义: int fun(double a,doubleB){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);
考题
在下列方法的定义中,正确的是 ( )A.public double x(){..;return false;}B.public static int x(double y){...}C.void x(doubled){...;return d}D.public static x(double a){..}
考题
有以下函数定义: int mypr(double a,double b) { return a*b; } 若以下选项中所用变量都已正确定义并赋值,错误的函数调用是A.if(mypr(x,y)){……}B.z=mypr(mypr(x,y),mypr(x,y));C.z=mypr(mypr(x,y)x,y);D.mypr(x,y);
考题
有以下方法的定义,请选择该方法的返回类型()。ReturnType method(bytex,doubley){return(short)x/y*2;}A、byteB、shortC、intD、double
考题
1. public class ReturnIt { 2. return Type methodA(byte x, double y) { 3. return (long)x / y * 2; 4. } 5. } What is the narrowest valid returnType for methodA in line2?() A、 intB、 byteC、 longD、 shortE、 floatF、 double
考题
有以下方法的定义,请选择该方法的返回类型()。 ReturnType method(byte x, double y){ return (short)x/y*2;}A、byteB、shortC、intD、double
考题
1. public class returnIt ( 2. returnType methodA(byte x, double y) ( 3. return (short) x/y * 2; 4. ) 5. ) What is the valid returnType for methodA in line 2?() A、 IntB、 ByteC、 LongD、 ShortE、 FloatF、 Double
考题
1. public class ReturnIt { 2. return Type methodA(byte x, double y) { 3. return (short)x / y * 2; 4. } 5. } What is the narrowest valid returnType for methodA in line2?() A、 intB、 byteC、 longD、 shortE、 floatF、 double
考题
public class returnIt ( returnType methodA(byte x, double y) ( return (short) x/y * 2; ) ) What is the valid returnType for methodA in line 2?()A、 IntB、 ByteC、 LongD、 ShortE、 FloatF、 Double
考题
单选题有以下方法的定义,请选择该方法的返回类型()。ReturnType method(bytex,doubley){return(short)x/y*2;}A
byteB
shortC
intD
double
考题
单选题1. public class returnIt ( 2. returnType methodA(byte x, double y) ( 3. return (short) x/y * 2; 4. ) 5. ) What is the valid returnType for methodA in line 2?()A
IntB
ByteC
LongD
ShortE
FloatF
Double
考题
单选题有以下方法的定义,请选择该方法的返回类型()。 ReturnType method(byte x, double y){ return (short)x/y*2;}A
byteB
shortC
intD
double
考题
单选题public class returnIt ( returnType methodA(byte x, double y) ( return (short) x/y * 2; ) ) What is the valid returnType for methodA in line 2?()A
IntB
ByteC
LongD
ShortE
FloatF
Double
考题
单选题有以下方法的定义,ReturnTypemethod(bytex,floaty){return(short)x/y*2;}请选择该方法的返回类型()。A
byteB
shortC
intD
float
考题
单选题1. public class ReturnIt { 2. return Type methodA(byte x, double y) { 3. return (short)x / y * 2; 4. } 5. } What is the narrowest valid returnType for methodA in line2?()A
intB
byteC
longD
shortE
floatF
double
考题
单选题1. public class ReturnIt { 2. return Type methodA(byte x, double y) { 3. return (long)x / y * 2; 4. } 5. } What is the narrowest valid returnType for methodA in line2?()A
intB
byteC
longD
shortE
floatF
double
热门标签
最新试卷