Home / C++ Programming / OOPS Concepts :: General Questions

C++ Programming :: OOPS Concepts

  1. Which of the following concepts is used to implement late binding?

  2. A.
    Virtual function
    B.
    Operator function
    C.
    Const function
    D.
    Static function

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Which of the following statement is correct?

  4. A.
    C++ allows static type checking.
    B.
    C++ allows dynamic type checking.
    C.
    C++ allows static member function be of type const.
    D.
    Both A and B.

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Which of the following factors supports the statement that reusability is a desirable feature of a language?

  6. A.
    It decreases the testing time.
    B.
    It lowers the maintenance cost.
    C.
    It reduces the compilation time.
    D.
    Both A and B.

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. Which of the following ways are legal to access a class data member using this pointer?

  8. A.
    this->x
    B.
    this.x
    C.
    *this.x
    D.
    *this-x

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. Which of the following is a mechanism of static polymorphism?

  10. A.
    Operator overloading
    B.
    Function overloading
    C.
    Templates
    D.
    All of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. Which of the following is correct about the statements given below?

    1. All operators can be overloaded in C++.
    2. We can change the basic meaning of an operator in C++.

  12. A.
    Only I is true.
    B.
    Both I and II are false.
    C.
    Only II is true.
    D.
    Both I and II are true.

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. What happens if the base and derived class contains definition of a function with same prototype?

  14. A.
    Compiler reports an error on compilation.
    B.
    Only base class function will get called irrespective of object.
    C.
    Only derived class function will get called irrespective of object.
    D.
    Base class object will call base class function and derived class object will call derived class function.

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. Which of the following are available only in the class hierarchy chain?

  16. A.
    Public data members
    B.
    Private data members
    C.
    Protected data members
    D.
    Member functions

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Which of the following is not a type of inheritance?

  18. A.
    Multiple
    B.
    Multilevel
    C.
    Distributive
    D.
    Hierarchical

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. Which of the following operators cannot be overloaded?

  20. A.
    []
    B.
    ->
    C.
    ?:
    D.
    *

    View Answer

    Workspace

    Discuss Discuss in Forum