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

C++ Programming :: OOPS Concepts

  1. Which of the following is used to make an abstract class?

  2. A.
    Declaring it abstract using static keyword.
    B.
    Declaring it abstract using virtual keyword.
    C.
    Making at least one member function as virtual function.
    D.
    Making at least one member function as pure virtual function.

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Which of the following access specifier is used as a default in a class definition?

  4. A.
    protected
    B.
    public
    C.
    private
    D.
    friend

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. What is correct about the static data member of a class?

  6. A.
    A static member function can access only static data members of a class.
    B.
    A static data member is shared among all the object of the class.
    C.
    A static data member can be accessed directly from main().
    D.
    Both A and B.

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. Which of the following provides a reuse mechanism?

  8. A.
    Abstraction
    B.
    Inheritance
    C.
    Dynamic binding
    D.
    Encapsulation

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. Which of the following statement is correct?

  10. A.
    Class is an instance of object.
    B.
    Object is an instance of a class.
    C.
    Class is an instance of data type.
    D.
    Object is an instance of data type.

    View Answer

    Workspace

    Discuss Discuss in Forum