• 2021-04-14 问题

    中国大学MOOC:编译并运行下面的程序,运行结果为( )。publicclassMain{publicstaticvoidmain(String[]args){AAobj=newBB();System.out.println(obj.f(4,6));}}classAA{doublef(doublex,doubley){returnx*y;}}classBBextendsAA{doublef(doublex,doubley){returnx+y;}}

    中国大学MOOC:编译并运行下面的程序,运行结果为( )。publicclassMain{publicstaticvoidmain(String[]args){AAobj=newBB();System.out.println(obj.f(4,6));}}classAA{doublef(doublex,doubley){returnx*y;}}classBBextendsAA{doublef(doublex,doubley){returnx+y;}}

  • 2021-04-14 问题

    如果定义inte=8;doublef=6.4,g=8.9;,则表达式f+int(e/3*int(f+g)/2)%4的值为()。

    如果定义inte=8;doublef=6.4,g=8.9;,则表达式f+int(e/3*int(f+g)/2)%4的值为()。

  • 2021-04-14 问题

    若有如下定义(在TurboC环境下)structdata{inti;charch;doublef;}b;则结构体变量b占用内存的字节数是().

    若有如下定义(在TurboC环境下)structdata{inti;charch;doublef;}b;则结构体变量b占用内存的字节数是().

  • 2022-06-04 问题

    interfaceA{doublef(doublex,doubley);}classBimplementsA{publicdoublef(doublex,doubley){returnx*y;}intg(inta,intb){returna+b;}}publicclassE{publicstaticvoidmain(Stringargs[]){Aa=newB();System.out.println(a.f(3,5));//【代码1】Bb=(B)a;System.out.println(b.g(3,5));//【代码2】}}代码1输出()代码2输出()

    interfaceA{doublef(doublex,doubley);}classBimplementsA{publicdoublef(doublex,doubley){returnx*y;}intg(inta,intb){returna+b;}}publicclassE{publicstaticvoidmain(Stringargs[]){Aa=newB();System.out.println(a.f(3,5));//【代码1】Bb=(B)a;System.out.println(b.g(3,5));//【代码2】}}代码1输出()代码2输出()

  • 2022-06-04 问题

    下列程序段运行结果是()interfaceA{doublef(doublex,doubley);}classBimplementsA{publicdoublef(doublex,doubley){returnx*y;}intg(inta,intb){returna+b;}}publicclassE{publicstaticvoidmain(String[]args){Aa=newB();System.out.println(a.f(3,5));Bb=(B)a;System.out.println(b.g(3,5));}} A: 15.0,8.0 B: 15.08 C: 158 D: 815

    下列程序段运行结果是()interfaceA{doublef(doublex,doubley);}classBimplementsA{publicdoublef(doublex,doubley){returnx*y;}intg(inta,intb){returna+b;}}publicclassE{publicstaticvoidmain(String[]args){Aa=newB();System.out.println(a.f(3,5));Bb=(B)a;System.out.println(b.g(3,5));}} A: 15.0,8.0 B: 15.08 C: 158 D: 815

  • 2022-06-09 问题

    若有函数原型:doublef(int,double);主函数中有变量定义:intx=1;doublem=1.6,n;下列主函数中对f函数的调用错误的是。 A: n=f(x,m+1); B: printf("%f",f(x+2,2.4)); C: f(x,m); D: n=f(x);

    若有函数原型:doublef(int,double);主函数中有变量定义:intx=1;doublem=1.6,n;下列主函数中对f函数的调用错误的是。 A: n=f(x,m+1); B: printf("%f",f(x+2,2.4)); C: f(x,m); D: n=f(x);

  • 1