更多“By the time you arrive, I ______ working for two hours A. will be B. can C. will h ”相关问题
  • 第1题:

    下面的程序的运行结果是__________

    func main() {strs := []string{"one", "two", "three"}for _, s := range strs { go func() { time.Sleep(1 * time.Second) fmt.Printf("%s ", s) }()}time.Sleep(3 * time.Second)}


    参考答案:three three three

  • 第2题:

    使用VC6打开考生文件夹下的工程test33_3。此工程包含一个test33_3.cpp,其中定义了表示时间的类Time,但Time类定义并不完整。请按要求完成下列操作,将程序补充完整。

    (1)定义类Time的私有数据成员hours、minutes和seconds,它们都是int型的数据,分别表示时间的小时、分和秒。请在注释“//**1**”之后添加适当的语句。

    (2)完成类Time缺省构造函数的定义,该函数将数据成员hours、minutes和seconds的值初始化为0,请在注释“//** 2**”之后添加适当的语句。

    (3)完成类Time带参构造函数的定义,该函数将数据成员hours、minutes和seconds的值分别初始化为参数h、m和s的值,请在注释“//**3**”之后添加适当的语句。

    (4)完成类Time中运算符“+”的重载,注意小时、分和秒在相加时的进位问题。请在注释“//**4**”之后添加适当的语句。

    注意:除在指定位置添加语句之外,请不要改动程序中的其他内容。

    程序输出结果如下:

    8:17:11

    源程序文件test33_3.cpp清单如下:

    include <iostream.h>

    class Time

    {

    //** 1 **

    public:

    Time ( )

    {

    //** 2 **

    seconds=0;

    }

    Time(int h, int m, int s)

    {

    //** 3 **

    minutes=m;

    seconds=s;

    }

    Time operator +(Time&);

    void gettime();

    };

    Time Time::operator +(Time& time)

    {

    //** 4 **

    s=time.seconds+seconds;

    m=time.minutes+minutes+s/60;

    h=time.hours+hours+m/60;

    Time result(h,m%60,s%60);

    return result;

    }

    void Time::gettime()

    {

    cout<<hours<<":"<<minutes<<":"<<seconds<<end1;

    }

    void main( )

    {

    Time t1(3,20,15),t2(4,56,56),t3;

    t3=t1+t2;

    t3.gettime();

    }


    正确答案:(1) int hoursminutesseconds; (2) hours=0; minutes=0; (3) hours=h; (4) int hms;
    (1) int hours,minutes,seconds; (2) hours=0; minutes=0; (3) hours=h; (4) int h,m,s; 解析:本题主要考查考生对于类的构造函数和运算符重载的掌握。构造函数可以有一个或多个参数,所以构造函数是可以重载的。而在类Time运算符“+”重载时,特别要注意重载函数要返回的是Time型的值,而分和秒是逢60进1的,不是逢 100进1或者单独相加各自的部分。

  • 第3题:

    YouaremanaginganOracleDatabase11gASMinstancewithadiskgroupdg01havingthreedisks.Oneofthedisksinthediskgroupbecomesunavailablebecauseofpowerfailure.YouissuedthefollowingcommandtochangetheDISK_REPAIR_TIMEattributefrom3.6hoursto5hours:ALTERDISKGROUPdg01SETATTRIBUTE’disk_repair_time’=’5h’;Towhichdisksinthediskgroupwillthenewvaluebeapplicable?()

    A.alldisksinthediskgroup

    B.alldisksthatarecurrentlyinOFFLINEmode

    C.alldisksthatarenotcurrentlyinOFFLINEmode

    D.alldisksinthediskgrouponlyifallofthemareONLINE


    参考答案:C

  • 第4题:

    —_______ I return the book to the library this week?— No, you _______.You can keep it until the end of this month.

    A.Must; needn’t

    B.Can; can’t

    C.May; mustn’t

    D.Can; mustn’t


    答案:A

  • 第5题:

    You are managing an Oracle Database 11g ASM instance with a disk group dg01 having three disks. One of the disks in the disk group becomes unavailable because of power failure. You issued the following command to change the DISK_REPAIR_TIME attribute from 3.6 hours to 5 hours:ALTER DISKGROUP dg01 SET ATTRIBUTE ‘disk_repair_time‘ = ‘5h‘;To which disks in the disk group will the new value be applicable?()

    A. all disks in the disk group

    B. all disks that are currently in OFFLINE mode

    C. all disks that are not currently in OFFLINE mode

    D. all disks in the disk group only if all of them are ONLINE


    参考答案:C

  • 第6题:

    A ______ talk is too long for those children.

    A. two hours

    B. two hour's

    C. two-hour

    D. two-hours


    正确答案:C
    答案为 C。对于这些孩子来说两个小时的谈话太长了。由连字符组成的 two-hour 可直接用作名词修饰另一名词;A选项不能直接修饰名词;B选项应在两词中间加连字符;D 选项用连字符连接时名词应为单数。