[单选题]

已知程序中已经定义了函数test,其原型是int test(int, int, int);,则下列重载形式中正确的是

A.char test(int,int,int);

B.double test(int,int,double);

C.int test(int,int,int=0);

D.float test(int,int,float=3.5F);

参考答案与解析:

相关试题

已知程序中已经定义了函数test,其原型是int test(int,int,in

[单选题]已知程序中已经定义了函数test,其原型是int test(int,int,int);,则下列重载形式中正确的是A.char test (int,int,int);B.double test(int,int,double);C.int test(int,int,int=O);D.float test(int,int,float=3.5F);

  • 查看答案
  • 考虑函数原型void test(int a,int b=7,char z=‘*’

    [单选题]考虑函数原型void test(int a,int b=7,char z=‘*’),下面的函数调用中,属于不合法调用的是( )。A.test(5);B.test(5,8);C.test(6,’#’);D.test(0,0,’x’);

  • 查看答案
  • 考虑函数原型void test(int a, int b=7,char z='*

    [单选题]考虑函数原型void test(int a, int b=7,char z='*'),下面的函数调用中,属于不合法调用的是A.test(5);B.test(5,8);C.test(6,'#');D.test(0,0,'*');

  • 查看答案
  • 已知函数fun的原型为int fun(int,int,int);下列重载函数原型

    [单选题]已知函数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);

  • 查看答案
  • 函数int test(int a,int b=1,int c=0),下列调用不合

    [单选题]函数int test(int a,int b=1,int c=0),下列调用不合法的个数是test(0); test(0,0);test();test(0,0,0);A.0B.1C.2D.3

  • 查看答案
  • 函数int test(int a,int b=l,int c=0),下列调用不合

    [单选题]函数int test(int a,int b=l,int c=0),下列调用不合法的个数是 test(0); test(0,0); test( ); test(0,0,0);A.0B.1C.2D.3

  • 查看答案
  • 函数int test(int a,int b=1,int c:0),下列调用不合

    [单选题]函数int test(int a,int b=1,int c:0),下列调用不合法的个数是 test(0); test(0,0); test( ); test(0,0,0);A.0B.1C.2D.3

  • 查看答案
  • ( 21 )已知函数 fun 的原型为int fun ( int,int,int

    [单选题]( 21 )已知函数 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 ) ;

  • 查看答案
  • 有如下程序public class Test{int a,b;Test ( ){

    [单选题]有如下程序 public class Test { int a,b; Test ( ) { a = 100; b = 200; } Test(int x, int y) { a = x; b = y; } public static void main(String args[]) { Test Obj1 = new Test(12,45); System.out.println("a = "Obj1.a+" b = "+ObB) ; Test Obj1 = new Test(); Sy

  • 查看答案
  • 已知函数fun的原型为<br />int fun(int,int,int);<br />下列重载函数原型中错误的是(  )。

    [单选题]已知函数fun的原型为int fun(int,int,int);下列重载函数原型中错误的是(  )。A.charfun(int,int);B.doub

  • 查看答案
  • 已知程序中已经定义了函数test,其原型是int test(int, int,