现有:1.classSuperFoo{2.SuperFoodoStuff(intx){3.returnnewSuperFoo();4.}5.}6.7.classFooextendsSuperFoo{8.//insertcodehere9.}和四个声明:FoodoStuff(intx){returnnewFoo();}FoodoStuff(intx){returnnewSuperFoo();}SuperFoodoStuff(intx){returnnewFoo();}SuperFoodoStuff(inty){returnnewSuperFoo();}分别插入到第8行,有几个可以通过编泽?()
现有:
1.classSuperFoo{
2.SuperFoodoStuff(intx){
3.returnnewSuperFoo();
4.}
5.}
6.
7.classFooextendsSuperFoo{
8.//insertcodehere
9.}
和四个声明:
FoodoStuff(intx){returnnewFoo();}
FoodoStuff(intx){returnnewSuperFoo();}
SuperFoodoStuff(intx){returnnewFoo();}
SuperFoodoStuff(inty){returnnewSuperFoo();}
分别插入到第8行,有几个可以通过编泽?()
相关考题:
( 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 ) ;
现有如下程序段#include "stdio.h"int fun(int k,int *m){if(k%3)*m=k*k;else *m=k/3;}main(){ int (*p)(int,int *),m;p=fun;(*p)(78, m);printf( "%d\n",m);}则程序段的输出结果为A.24B.25C.26D.27
现有如下五个声明:inta_really_really_really_long_variable_name=5;int_hi=6;intbig=Integer.getInteger(7);int$dollars=8;int%percent=9;有几个可以通过编译?() A.1B.2C.3D.4
现有如下五个声明:Linel:inta_really_really_really_long_variable_name=5;Line2:int_hi=6;Line3:intbig=Integer.getlnteger(7”);Line4:int$dollars=8;line5:int%opercent=9;哪行无法通过编译?() A.Line1B.Line3C.Line4D.Line5
已知程序中已经定义了函数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,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);
现有如下程序段#include "stdio.h"int *fun(int *a,int *b){int c;c=*a%*b;return c;}main(){int a=5,b=19,*c;c=fun(a,b);printf("%d\n",++*c);}则程序段执行后的结果为A.8B.7C.6D.5