• 2022-06-01
    int(5.5).bit_length()的结果是
  • 3

    内容

    • 0

      下列程序的输出结果为 class Box{ int length,width,height; public void setInfo(int l,int w,int h){ length = l; width = w; height = h; } public int volumn(){ return length*width*height; } public int area(){ return (length*width + length*height + width*height) * 2; } public String toString(){ return "Length:" + length + " width:" + width + " height:" + height + " volumn: " + volumn() + " area:" + area(); }} public class BoxTest { public static void main(String[] args) { Box b = new Box(); b.setInfo(5,2,4); System.out.println(b.toString()); }}

    • 1

      以下C的程序片段输出的结果是( )。char p[20]; char *s = "Data"; int length = strlen(s); int i; for (i = 0; i < length; i++) p[i] = s[length - i]; printf("%s", p);[/i] A: 输出是空白 B: data C: atad D: adat

    • 2

      定义类A和类B如下,得到结果是 class A{ int x; A(int i){x=i;} } class B extends A{ double b=5.5; }

    • 3

      5.5执行下列语句:float a; int b; a = b =24.5/5; printf(“%f,%d”, a, b);输出结果是______ 。

    • 4

      int intArray[]={0,2,4,6,8}; int length=int Array.length();()