Object Oriented Programming - Basics

20 Questions | Total Attempts: 80

SettingsSettingsSettings
Please wait...
Programming Quizzes & Trivia

This quiz is on Object Oriented Programming. It contains most of the oop concepts and is independent of any programming language. Give it a try and get to know how strong you are in oops.


Questions and Answers
  • 1. 
    Method with the same name or different return type and difference in the parameters either in number or type is known as
    • A. 

      Function overloading

    • B. 

      Compile Time Overloading

  • 2. 
    One or more function that has different number of argument or different type of argument but all have same return type is called as
  • 3. 
    Which of the following is not a part of OOP?
    • A. 

      Type checking

    • B. 

      Multitasking

    • C. 

      Polymorphism

    • D. 

      Information hiding

  • 4. 
    To call a base class constructor in a derived class, is it needed to call the base class initializer.
    • A. 

      True

    • B. 

      False

  • 5. 
    Can objects of abstract classes be instantiated
    • A. 

      True

    • B. 

      False

  • 6. 
    Mention two forms of polymorphism
  • 7. 
    A system that translates domain names to IP addressesis referred to as
  • 8. 
    The process by which one object can acquire the properties of another object
    • A. 

      Encapsulation

    • B. 

      Inheritance

    • C. 

      Polymorphism

  • 9. 
    Constructors are used to
    • A. 

      To build a user interface.

    • B. 

      Free memory.

    • C. 

      Initialize a newly created object.

    • D. 

      To create a sub class

  • 10. 
    An object that has more than one form is referred to as
    • A. 

      Inheritance

    • B. 

      Interface

    • C. 

      Abstract class

    • D. 

      Polymorphism

  • 11. 
    Information Hiding can also be termed as
    • A. 

      Data hiding

    • B. 

      Encapsulation

    • C. 

      Inheritance

  • 12. 
    When deriving from a private base class, the public, protected and private members of the base class become private members of the derived class.
    • A. 

      True

    • B. 

      False

  • 13. 
    Pick the term that relates to polymorphism
    • A. 

      Dynamic binding

    • B. 

      Dynamic allocation

    • C. 

      Static typing

    • D. 

      Static allocation

  • 14. 
    Two or more methods with same name in the same class with different arguments is called as
    • A. 

      Method overriding

    • B. 

      Method overloading

  • 15. 
    Main method can be overriden
    • A. 

      True

    • B. 

      False

  • 16. 
    Keyword which is used to access the method or member variables from the superclass
    • A. 

      Super

    • B. 

      Using

    • C. 

      Is_a

    • D. 

      Has_a

  • 17. 
    An _______ cannot provide any code at all,can provide only  the signature.
    • A. 

      Abstract class

    • B. 

      Interface

  • 18. 
    What modifiers are allowed for methods in an Interface (choose one or more answers)
    • A. 

      Public

    • B. 

      Private

    • C. 

      Abstract

  • 19. 
    When sub class declares a method that has the same type arguments as a method declared by one of its superclass,it is termed as
    • A. 

      Method overriding

    • B. 

      Method overloading

    • C. 

      Operator overloading

    • D. 

      Operator overriding

  • 20. 
    Static methods cannot be accessed directly from the class level.
    • A. 

      True

    • B. 

      False

Back to Top Back to top