第九章单元测试
  1. 在运算符重载中,operator++(int); 实现前置++的重载。( )

  2. A:对 B:错
    答案:错
  3. 双目运算符用成员函数重载时参数表中只需要一个参数。( )

  4. A:错 B:对
  5. 类的转换构造函数可以将其它类型转换为本类对象。 ( )

  6. A:对 B:错
  7. 假设OneClass为一个类,则该类的拷贝初始化构造函数的声明语句为 ( )

  8. A:OneClass& (OneClass p); B:OneClass(OneClass *p); C:OneClass(OneClass p); D:OneClass(OneClass & p);
  9. What is a binary operator? ( )

  10. A:Operator that performs its action on any number of operands B:Operator that performs its action on two operand C:Operator that performs its action on a single operand D:Operator that performs its action on three operand
  11. In the case of friend operator overloaded functions how many maximum object arguments a unary operator overloaded function can take? ( )

  12. A:2 B:3 C:1 D:0
  13. How many parameters does a conversion operator may take? ( )

  14. A:2 B:1 C:as many as possible D:0
  15. The copy constructors can be used to ________ ( )

  16. A:Copy an object so that it can be passed to a class B:Copy an object so that it can be passed to a function C:Copy an object for type casting D:Copy an object so that it can be passed to another primitive type variable

温馨提示支付 ¥3.00 元后可查看付费内容,请先翻页预览!
点赞(2) dxwkbang
返回
顶部