niusouti.com
更多“单选题若要对类BigNumber中重载的类型转换运算符long进行声明,下列选项中正确的是()。A operator long()const;B operator long(bigNumber);C long operator long()const;D long operator long(BigNumber);”相关问题
  • 第1题:

    若要对类BigNumber中重载的类型转换运算符long进行声明,下列选项中正确的是( )。

    A) operator long()const;

    B) operator long(bigNumber);

    C) long operator long() const;

    D) long operator long(BigNumber);

    A.

    B.

    C.

    D.


    正确答案:A

  • 第2题:

    Java语言中数据类型之间的自动类型转换是由优先关系从低级数据类型转换成高级数据类型,下面选项中自动类型转换优先级由低到高排列正确的是

    A.char→long→int→double→float

    B.char→int→long→double→float

    C.char→int→long→float→double

    D.char→int→float→double→long


    正确答案:C
    解析:自动类型转换是按优先关系从低级数据转换成高级数据,规定的优先次序是char→int→long→float→double。对自动类型转换的优先关系不了解。

  • 第3题:

    将运算符“+”重载为非成员函数,下列原型声明中,错误的是( )。

    A.MyClockoperator+(MyClock,long);

    B.MyClockoperator+(MyClock,MyCloek);

    C.MyCloekoperator+(long,long);

    D.MyClockoperator+(long,MyCloek):


    正确答案:C
    C。【解析】非成员函数一般都是友元函数,相比成员函数第一个操作数是对象本身以thiS指针的形式隐含在参数列表中,非成员函数调用必须显式的列出参数;选项C中没有MyClock类型,故选C。

  • 第4题:

    若要对Date类中重载的加法运算符成员函数进行声明,下列选项中正确的是( )。

    A.Data+{Data};

    B.Dataoperator+{Data};

    C.Data+operator{Data};

    D.operator+{Data.Data};


    正确答案:B
    B。【解析】重载运算符的函数一般格式如为:函数类型0perator运算符名称(形参列表),因此选8。

  • 第5题:

    The operator needs to execute a long-running shell script. How can the script be executed so the operator does not have to wait until it is complete to access the command prompt?()

    A. ./script.ksh

    B. nohup ./script.ksh

    C. run -b ./script.ksh

    D. ./script.ksh > nohup.out


    参考答案:A

  • 第6题:

    Which maintenance functions can a GMDSS Radio Operator perform ________.

    A.The Operator can make fine internal adjustments to the transmitter as long as the output power does not change by more than one percent

    B.The Operator is responsible for ensuring that INMARSAT antennas are free of built-up soot and clear of obstacles

    C.All levels of maintenance must be performed by a licensed GMDSS Radio Maintainer

    D.The Operator may install an EPROM in order to ensure that the equipment continues to operate within legal constraints


    正确答案:B

  • 第7题:

    都是VB.NET中的数据类型的选项是()

    • A、Short、Integer、Long、Float、Double
    • B、Short、Int、Long、Single、Double
    • C、Integer、Long、Single、Double、Decimal
    • D、Boolen、Byte、Bit、Decimal、Date

    正确答案:C

  • 第8题:

    在C程序中,设一表达式中包含有int,long,char和unsigned类型的变量和数据,这四种类型数据的转换规则是()。

    • A、int→unsigned→long→char
    • B、char→int→long→unsigned
    • C、char→int→unsigned→long
    • D、int→char→unsigned→long

    正确答案:C

  • 第9题:

    单选题
    都是VB.NET中的数据类型的选项是()
    A

    Short、Integer、Long、Float、Double

    B

    Short、Int、Long、Single、Double

    C

    Integer、Long、Single、Double、Decimal

    D

    Boolen、Byte、Bit、Decimal、Date


    正确答案: D
    解析: 暂无解析

  • 第10题:

    单选题
    在C程序中,设一表达式中包含有int,long,char和unsigned类型的变量和数据,这四种类型数据的转换规则是()。
    A

    int→unsigned→long→char

    B

    char→int→long→unsigned

    C

    char→int→unsigned→long

    D

    int→char→unsigned→long


    正确答案: D
    解析: 暂无解析

  • 第11题:

    单选题
    若要对Data类中重载的加法运算符成员函数进行声明,下列选项中正确的是(  )。
    A

    Data+ (Data);

    B

    Data operator+(Data);

    C

    Data +operator(Data);

    D

    operator+ (Data, Data);


    正确答案: B
    解析:
    “+”是一个二元运算符,因此作为成员函数重载时参数表中只有一个参数,它对应于第二个操作数,而第一个操作数是对象本身。因此,声明形式为“Data operator+(Data)”。

  • 第12题:

    单选题
    若要对类BigNumber中重载的类型转换运算符long进行声明,下列选项中正确的是()。
    A

    operator long()const;

    B

    operator long(bigNumber);

    C

    long operator long()const;

    D

    long operator long(BigNumber);


    正确答案: A
    解析:
    在重载类型转换符时,由于运算符本身已经表示出返回值类型,因此不需要返回值类型的声明,CD两项错误。类型转换运算符只能作为成员函数重载,long是一元运算符,形参的个数比操作数个数少一个,因此重载函数无参数。

  • 第13题:

    有如下类模板定义: template class BigNumber{ long n; public: BigNumber(T i):n(i

    有如下类模板定义:

    template<typename T>

    class BigNumber{

    long n;

    public:

    BigNumber(T i):n(i){}

    BigNumber operator+(BigNumber B) {

    return BigNumber(n+b.n);

    }

    }

    已知b1、b2是BigNumber的两个对象,则下列表达式中错误的是( )。

    A) b1+b2

    B) b1+3

    C) 3+b1

    D) 3+3

    A.

    B.

    C.

    D.


    正确答案:C

  • 第14题:

    若要对Date类中重载的加法运算符成员函数进行声明,下列选项中正确的是( )。 A.Data+(Data);SX

    若要对Date类中重载的加法运算符成员函数进行声明,下列选项中正确的是( )。

    A.Data+(Data);

    B.Dataoperator+(Data);

    C.Data+operator(Data);

    D.operator+(Data.Data);


    正确答案:B
    B:【解析】重载运算符的函数一般格式如下:函数类型0perator运算符名称(形参列表)因此选B。

  • 第15题:

    若是对类BigNumber中重载的类型转换运算符long进行声明,下列选项中正确的是( )。

    A.operatorlong()const;

    B.operatorlong(BigNumber);

    C.10ngoperatorlong()const;

    D.10ngoperatorlong(BigNumber);


    正确答案:A
    A。【解析】C++不仅可以对运算符进行重载,还可以重载类型转换符,函数声明的形式勾operator类型符const。

  • 第16题:

    若要对Data类中重载的加法运算符成员函数进行声明,下列选项中正确的是( )。 A.Data+(DatA.;SXB

    若要对Data类中重载的加法运算符成员函数进行声明,下列选项中正确的是( )。

    A.Data+(DatA.;

    B.Data operator+(DatA.;

    C.Data+operator(DatA.;

    D.operator+(Data,DatA.;


    正确答案:B
    根据重载加法运算符的格式,只有B选项正确。

  • 第17题:

    According to the passage, when you get a wrong number in making a long-distance call, you should______.

    A. check your number and call again

    B. tell the operator what has happened

    C. Ask the operator to put you through

    D. Ask the operator what has happened


    正确答案:B

    39.答案为B  第二段...call the operator and explain what happened可知拨错号码后可向接线员解释,以免收费。

  • 第18题:

    都是VB.NET中的数据类型的选项是()

    AShort、Integer、Long、Float、Double

    BShort、Int、Long、Single、Double

    CInteger、Long、Single、Double、Decimal

    DBoolen、Byte、Bit、Decimal、Date


    C

  • 第19题:

    下选项中不属于C语言的类型是()。

    • A、signed short int
    • B、unsigned long int
    • C、unsigned int
    • D、long short

    正确答案:D

  • 第20题:

    The operator needs to execute a long-running shell script. How can the script be executed so the operator does not have to wait until it is complete to access the command prompt?()

    • A、./script.ksh
    • B、nohup ./script.ksh
    • C、run -b ./script.ksh
    • D、./script.ksh > nohup.out

    正确答案:A

  • 第21题:

    单选题
    The operator needs to execute a long-running shell script. How can the script be executed so the operator does not have to wait until it is complete to access the command prompt?()
    A

    ./script.ksh

    B

    nohup ./script.ksh

    C

    run -b ./script.ksh

    D

    ./script.ksh > nohup.out


    正确答案: C
    解析: 暂无解析

  • 第22题:

    单选题
    Which statement concerning GMDSS Radio Operator requirements is FALSE().
    A

    Each compulsory vessel must carry at least two licensed GMDSS Radio Operators at all times while at sea

    B

    Each compulsory vessel must carry at least two licensed Radio Operators at all times while at sea and may elect to carry a GMDSS Radio Maintainer as well

    C

    Communications involving safety of life at sea do not have to be logged as long as the compulsory vessel was not involved in such communications

    D

    While at sea,adjustments to,and the maintaining of,GMDSS equipment may be performed by the GMDSS Radio operator as long as the work is supervised by an onboard licensed GMDSS Radio Maintainer


    正确答案: B
    解析: 暂无解析

  • 第23题:

    单选题
    将运算符“+”重载为非成员函数,下列原型声明中,错误的是(  )。
    A

    MyClock operator+(MyClock,long);

    B

    MyClock operator+(MyClock,MyClock);

    C

    MyClock operator+(1ong,long);

    D

    MyClock operator+(1ong,MyClock);


    正确答案: C
    解析:
    重载的“+'运算符的两个参数都是long类型,而C++已经提供了求两个long型数据之和的运算符+,编译器无法区分应该调用哪一个。该运算符重载有二义性。

  • 第24题:

    单选题
    Which maintenance functions can a GMDSS Radio Operator perform().
    A

    The Operator can make fine internal adjustments to the transmitter as long as the output power does not change by more than one percent

    B

    The Operator is responsible for ensuring that INMARSAT antennas are free of built-up soot and clear of obstacles

    C

    All levels of maintenance must be performed by a licensed GMDSS Radio Maintainer

    D

    The Operator may install an EPROM in order to ensure that the equipment continues to operate within legal constraints


    正确答案: B
    解析: 暂无解析