• 2022-07-28 问题

    如果要实现计算x绝对值的功能,下面程序有错误的是? A: int fun(int x){ if(x<0) return -x;<br> return x; } B: int fun(int x){ if(x<0) return -x;<br> else return x; } C: int fun(int x){ if(x<0) return -x;<br> if(x>0) return x; } D: int fun(int x){ if(x<0) return -x;<br> else if(x==0) return x; else return x; }

    如果要实现计算x绝对值的功能,下面程序有错误的是? A: int fun(int x){ if(x<0) return -x;<br> return x; } B: int fun(int x){ if(x<0) return -x;<br> else return x; } C: int fun(int x){ if(x<0) return -x;<br> if(x>0) return x; } D: int fun(int x){ if(x<0) return -x;<br> else if(x==0) return x; else return x; }

  • 2022-07-29 问题

    5以下正确的函数定义是()。 A: int*fun10(doublex){returnx;} B: int*fun10(doublex){return&x;} C: int*fun10(inta){return*a;} D: int*fun10(inta){return&a;}

    5以下正确的函数定义是()。 A: int*fun10(doublex){returnx;} B: int*fun10(doublex){return&x;} C: int*fun10(inta){return*a;} D: int*fun10(inta){return&a;}

  • 2022-05-28 问题

    以下函数定义正确的是 ( ) A: def x:return 1 B: def _x(): return 1 C: def !x(): return 1 D: def 求和(x, y): return x + y

    以下函数定义正确的是 ( ) A: def x:return 1 B: def _x(): return 1 C: def !x(): return 1 D: def 求和(x, y): return x + y

  • 2022-06-16 问题

    下列函数模板的定义中,合法的是( )。 A: templateT abs(T X){return x<07-x:X;} B: template ClassT abs(T x){return x<07-X:x;} C: template Tabs(T X){return x<07-x:X;} D: template T abs(T x){return X<0-X:x;}

    下列函数模板的定义中,合法的是( )。 A: templateT abs(T X){return x<07-x:X;} B: template ClassT abs(T x){return x<07-X:x;} C: template Tabs(T X){return x<07-x:X;} D: template T abs(T x){return X<0-X:x;}

  • 2022-07-24 问题

    Which two are valid examples of method overriding?() A:  float getVar() {return x:} B:  public float getVar() {return x; } C:  public double getVar() {return x; } D:  protected float getVar() {return x; } E:  public float getVar(float f) {return f;}

    Which two are valid examples of method overriding?() A:  float getVar() {return x:} B:  public float getVar() {return x; } C:  public double getVar() {return x; } D:  protected float getVar() {return x; } E:  public float getVar(float f) {return f;}

  • 2022-05-29 问题

    下面函数定义正确的是_____。 A: float fun(float x; float y){ return x*y;} B: float fun(float x, y){ return x*y;} C: float fun(x,y){ int x,y; return x*y;} D: float fun( int x, int y){ return x*y; }

    下面函数定义正确的是_____。 A: float fun(float x; float y){ return x*y;} B: float fun(float x, y){ return x*y;} C: float fun(x,y){ int x,y; return x*y;} D: float fun( int x, int y){ return x*y; }

  • 2022-06-15 问题

    Given: Which five methods, inserted independently at line 5, will compile?() A:  protected int blipvert(long x) { return 0; } B:  protected long blipvert(int x) { return 0; } C:  private int blipvert(long x) { return 0; } D:  private int blipvert(int x) { return 0; } E:  public int blipvert(int x) { return 0; } F:  protected long blipvert(long x) { return 0; } G:  protected long blipvert(int x, int y) { return 0; }

    Given: Which five methods, inserted independently at line 5, will compile?() A:  protected int blipvert(long x) { return 0; } B:  protected long blipvert(int x) { return 0; } C:  private int blipvert(long x) { return 0; } D:  private int blipvert(int x) { return 0; } E:  public int blipvert(int x) { return 0; } F:  protected long blipvert(long x) { return 0; } G:  protected long blipvert(int x, int y) { return 0; }

  • 2022-06-15 问题

    Given: Which five methods, inserted independently at line 5, will compile?() A: public int blipvert(int x) { return 0; } B: private int blipvert(int x) { return 0; } C: private int blipvert(long x) { return 0; } D: protected long blipvert(int x) { return 0; } E: protected int blipvert(long x) { return 0; } F: protected long blipvert(long x) { return 0; }

    Given: Which five methods, inserted independently at line 5, will compile?() A: public int blipvert(int x) { return 0; } B: private int blipvert(int x) { return 0; } C: private int blipvert(long x) { return 0; } D: protected long blipvert(int x) { return 0; } E: protected int blipvert(long x) { return 0; } F: protected long blipvert(long x) { return 0; }

  • 2022-06-15 问题

    Which five methods,inserted independently at line 5,will compile?() A: public int blipvert(int x){return 0;} B: private int blipvert(int x){return 0;} C: private int blipvert(long x){return 0;} D: protected int blipvert(long x){return 0;} E: protected long blipvert(long x){return 0;} F: protected long blipvert(int x, int y){return 0;}

    Which five methods,inserted independently at line 5,will compile?() A: public int blipvert(int x){return 0;} B: private int blipvert(int x){return 0;} C: private int blipvert(long x){return 0;} D: protected int blipvert(long x){return 0;} E: protected long blipvert(long x){return 0;} F: protected long blipvert(int x, int y){return 0;}

  • 2021-04-14 问题

    【单选题】求一个角的正弦函数值的平方。能够实现此功能的函数是 ____ 。 A. sqofsina(x) float x ; { return(sin(x)*sin(x)) ; } B. double sqofsinb(x) float x ; { return(sin((double)x)*sin((double)x)) ; } C. double sqofsinc(x) { return(((sin(x)*sin(x)) ; } D. sqofsind(x) float x ; { return(double(sin(x)*sin(x))) ; }

    【单选题】求一个角的正弦函数值的平方。能够实现此功能的函数是 ____ 。 A. sqofsina(x) float x ; { return(sin(x)*sin(x)) ; } B. double sqofsinb(x) float x ; { return(sin((double)x)*sin((double)x)) ; } C. double sqofsinc(x) { return(((sin(x)*sin(x)) ; } D. sqofsind(x) float x ; { return(double(sin(x)*sin(x))) ; }

  • 1 2 3 4 5 6 7 8 9 10