网友您好, 请在下方输入框内输入要搜索的题目:

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

operator long()const;

B

operator long(bigNumber);

C

long operator long()const;

D

long operator long(BigNumber);


参考答案

参考解析
解析:
在重载类型转换符时,由于运算符本身已经表示出返回值类型,因此不需要返回值类型的声明,CD两项错误。类型转换运算符只能作为成员函数重载,long是一元运算符,形参的个数比操作数个数少一个,因此重载函数无参数。
更多 “单选题若要对类BigNumber中重载的类型转换运算符long进行声明,下列选项中正确的是()。A operator long()const;B operator long(bigNumber);C long operator long()const;D long operator long(BigNumber);” 相关考题
考题 ( 33 )将运算符 “ + ” 重载为非成员函数,下列原型声明中,错误的是A ) MyClock operator + (MyClock,long);B ) MyClock operator + (MyClock,MyClock);C ) MyClock operator + (long,long);D ) MyClock operator + (long,MyClock);

考题 将运算符“+”重载为非成员函数,下列原型声明中,错误的是( )。A.MyClock operator+(MyClock,long);B.MyClock operator+(MyClock,MyClock);C.MyClock operator+(long,long);D.MyClock operator+(long,MyClock);

考题 已知n是一个int型变量,下列语句中错误的是( )。A.long*p=new long[n];B.long p[n];C.long*p=new long(n);D.long p[10];

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

考题 若要对类BigNumber中重载的类型转换运算符long进行声明,下列选项中正确的是( )。A) operator long()const;B) operator long(bigNumber);C) long operator long() const;D) long operator long(BigNumber);A.B.C.D.

考题 有如下类模板定义: 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+b2B) b1+3C) 3+b1D) 3+3A.B.C.D.

考题 Java语言中数据类型之间的自动类型转换是由优先关系从低级数据类型转换成高级数据类型,下面选项中自动类型转换优先级由低到高排列正确的是A.char→long→int→double→floatB.char→int→long→double→floatC.char→int→long→float→doubleD.char→int→float→double→long

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

考题 将运算符“+”重载为非成员函数,下列原型声明中,错误的是( )。A.MyClockoperator+(MyClock,long);B.MyClockoperator+(MyClock,MyCloek);C.MyCloekoperator+(long,long);D.MyClockoperator+(long,MyCloek):

考题 若是对类BigNumber中重载的类型转换运算符long进行声明,下列选项中正确的是( )。A.operatorlong()const;B.operatorlong(BigNumber);C.10ngoperatorlong()const;D.10ngoperatorlong(BigNumber);

考题 若要对Date类中重载的加法运算符成员函数进行声明,下列选项中正确的是( )。A.Data+{Data};B.Dataoperator+{Data};C.Data+operator{Data};D.operator+{Data.Data};

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

考题 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.kshB. nohup ./script.kshC. run -b ./script.kshD. ./script.ksh nohup.out

考题 According to the passage, when you get a wrong number in making a long-distance call, you should______.A. check your number and call againB. tell the operator what has happenedC. Ask the operator to put you throughD. Ask the operator what has happened

考题 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 percentB.The Operator is responsible for ensuring that INMARSAT antennas are free of built-up soot and clear of obstaclesC.All levels of maintenance must be performed by a licensed GMDSS Radio MaintainerD.The Operator may install an EPROM in order to ensure that the equipment continues to operate within legal constraints

考题 都是VB.NET中的数据类型的选项是()AShort、Integer、Long、Float、DoubleBShort、Int、Long、Single、DoubleCInteger、Long、Single、Double、DecimalDBoolen、Byte、Bit、Decimal、Date

考题 都是VB.NET中的数据类型的选项是()A、Short、Integer、Long、Float、DoubleB、Short、Int、Long、Single、DoubleC、Integer、Long、Single、Double、DecimalD、Boolen、Byte、Bit、Decimal、Date

考题 下选项中不属于C语言的类型是()。A、signed short intB、unsigned long intC、unsigned intD、long short

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

考题 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.kshB、nohup ./script.kshC、run -b ./script.kshD、./script.ksh nohup.out

考题 单选题都是VB.NET中的数据类型的选项是()A Short、Integer、Long、Float、DoubleB Short、Int、Long、Single、DoubleC Integer、Long、Single、Double、DecimalD Boolen、Byte、Bit、Decimal、Date

考题 单选题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.kshB nohup ./script.kshC run -b ./script.kshD ./script.ksh nohup.out

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

考题 单选题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 seaB 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 wellC Communications involving safety of life at sea do not have to be logged as long as the compulsory vessel was not involved in such communicationsD 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

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

考题 单选题将运算符“+”重载为非成员函数,下列原型声明中,错误的是(  )。A MyClock operator+(MyClock,long);B MyClock operator+(MyClock,MyClock);C MyClock operator+(1ong,long);D MyClock operator+(1ong,MyClock);

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

考题 单选题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 percentB The Operator is responsible for ensuring that INMARSAT antennas are free of built-up soot and clear of obstaclesC All levels of maintenance must be performed by a licensed GMDSS Radio MaintainerD The Operator may install an EPROM in order to ensure that the equipment continues to operate within legal constraints