[单选题]

函数int test(int a,int b=1,int c=0),下列调用不合法的个数是test(0); test(0,0);test();test(0,0,0);

A.0

B.1

C.2

D.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

  • 查看答案
  • 函数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

  • 查看答案
  • 设有以下函数: f(int a){int b=0;static int c=3;

    [单选题]设有以下函数: f(int a) { int b=0; static int c=3; b++; c++; return(a+b+c); } 如果在下面的程序中调用该函数,则输出结果是______。 main() { int a=2, i; for(i=0; i<3; i++)printf("% d/n", f(a)); }A.7 8 9B.7 9 11C.7 10 13D.7 7 7

  • 查看答案
  • 执行C程序代码“int a=1;int b=0;int c=0;int d=(£

    [单选题]执行C程序代码“int a=1;int b=0;int c=0;int d=(++a)*(c=1);”后,a、b、 c、d的值分别为(59)。A.2,0,1,2B.1,0,1,1C.2,0,1,1D.2,0,0,2

  • 查看答案
  • 执行C程序代码“int a=1;int b=0;int c=0;int d=(£

    [单选题]执行C程序代码“int a=1;int b=0;int c=0;int d=(++a)*(c=1);”后,a、b、c、d的值分别为(29)。A.2,0,1,2B.1,0,1,1C.2,0,1,1D.2,0,0,2

  • 查看答案
  • 执行C程序代码“int a=1; int b=0; int c=0; int d

    [单选题]执行C程序代码“int a=1; int b=0; int c=0; int d=(++a)*(c=1);”后,a、b、c、d的值分别为(29)。A.2,0,1,2B.1,0,1,1C.2,0,1,1D.2,0,0,2

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

    [单选题]已知程序中已经定义了函数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);

  • 查看答案
  • 已知下列函数定义:fun(int*b,int c,intD){int k;for

    [单选题]已知下列函数定义: fun(int*b,int c,intD){int k; for(k=0;k<c*d;k++) {*b=c+d; b++;} } 则调用此函数的正确写法是(假设变量a的说明为int a[10])( )。A.fun(*a,6,14);B.fim(&a,6,8);C.fun(a,8,4);D.fun((int)a,8,6);

  • 查看答案
  • 考虑函数原型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’);

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