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

C++ Programming :: OOPS Concepts

  1. Which of the following concepts means wrapping up of data and functions together?

  2. A.
    Abstraction
    B.
    Encapsulation
    C.
    Inheritance
    D.
    Polymorphism

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Which of the following concepts means waiting until runtime to determine which function to call?

  4. A.
    Data hiding
    B.
    Dynamic casting
    C.
    Dynamic binding
    D.
    Dynamic loading

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. How "Late binding" is implemented in C++?

  6. A.
    Using C++ tables
    B.
    Using Virtual tables
    C.
    Using Indexed virtual tables
    D.
    Using polymorphic tables

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. Which of the following operator is overloaded for object cout?

  8. A.
    >>
    B.
    <<
    C.
    +
    D.
    =

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. Which of the following is the correct class of the object cout?

  10. A.
    iostream
    B.
    istream
    C.
    ostream
    D.
    ifstream

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. Which of the following cannot be used with the keyword virtual?

  12. A.
    class
    B.
    member functions
    C.
    constructor
    D.
    destructor

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. Which of the following functions are performed by a constructor?

  14. A.
    Construct a new class
    B.
    Construct a new object
    C.
    Construct a new function
    D.
    Initialize objects

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. Which of the following problem causes an exception?

  16. A.
    Missing semicolon in statement in main().
    B.
    A problem in calling function.
    C.
    A syntax error.
    D.
    A run-time error.

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Which one of the following options is correct about the statement given below? The compiler checks the type of reference in the object and not the type of object.

  18. A.
    Inheritance
    B.
    Polymorphism
    C.
    Abstraction
    D.
    Encapsulation

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. Which of the following is the correct way of declaring a function as constant?

  20. A.
    const int ShowData(void) { /* statements */ }
    B.
    int const ShowData(void) { /* statements */ }
    C.
    int ShowData(void) const { /* statements */ }
    D.
    Both A and B

    View Answer

    Workspace

    Discuss Discuss in Forum