OOP (UGC/NET)

OOP (UGC/NET)

8 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following features in OOP means a function can take multiple forms based on the type of arguments, number of arguments and data type of return value?

  1. Data encapsulation
  2. Dynamic binding
  3. Polymorphism
  4. Inheritance
  5. Data abstraction
Question 2 Multiple Choice (Single Answer)

Which of the following types of constructor is used to initialize all objects of the same class to the same set of values?

  1. Copy constructor
  2. Default constructor
  3. Parameterized constructor
  4. Friend function
  5. Structure
Question 3 Multiple Choice (Single Answer)

Which of the following types of constructor is a parameterized constructor using which one object can be copied to another object?

  1. Copy constructor
  2. Default constructor
  3. Overloaded constructor
  4. Destructor
  5. Zero constructor
Question 4 Multiple Choice (Single Answer)

Which of the following properties of OOP means that two or more functions have the same name, but differ in the number of arguments or data type of arguments?

  1. Inheritance
  2. Data encapsulation
  3. Function overloading
  4. Data abstraction
  5. Dynamic binding
Question 5 Multiple Choice (Single Answer)

Which of the following conditions must hold to say that a particular function is overloaded in C++?

  1. The function must have a different name.
  2. The function must be an inline function.
  3. The function must have the same name with different argument and different return type.
  4. The same function must be inherited by another class.
  5. The function must have no return type nor any arguments.
Question 6 Multiple Choice (Single Answer)

Which of the following forms of inheritance is present when a class is derived from the classes that are already derived?

  1. Single inheritance
  2. Multilevel inheritance
  3. Multiple inheritance
  4. Hierarchical inheritance
  5. Hybrid inheritance
Question 7 Multiple Choice (Single Answer)

Which of the following keywords is used in C++ when two or more objects are derived from a common base class and to prevent multiple copies of the base class being present in an object derived from other derived classes?

  1. void
  2. break
  3. exit
  4. virtual
  5. continue
Question 8 Multiple Choice (Single Answer)

Which of the following types of inheritance is used in a class when the public members of a base class become the private members of the derived class?

  1. Public inheritance
  2. Private inheritance
  3. Protected inheritance
  4. Public protected inheritance
  5. Single inheritance