Questions
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?
- Data encapsulation
- Dynamic binding
- Polymorphism
- Inheritance
- Data abstraction
Which of the following types of constructor is used to initialize all objects of the same class to the same set of values?
- Copy constructor
- Default constructor
- Parameterized constructor
- Friend function
- Structure
Which of the following types of constructor is a parameterized constructor using which one object can be copied to another object?
- Copy constructor
- Default constructor
- Overloaded constructor
- Destructor
- Zero constructor
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?
- Inheritance
- Data encapsulation
- Function overloading
- Data abstraction
- Dynamic binding
Which of the following conditions must hold to say that a particular function is overloaded in C++?
- The function must have a different name.
- The function must be an inline function.
- The function must have the same name with different argument and different return type.
- The same function must be inherited by another class.
- The function must have no return type nor any arguments.
Which of the following forms of inheritance is present when a class is derived from the classes that are already derived?
- Single inheritance
- Multilevel inheritance
- Multiple inheritance
- Hierarchical inheritance
- Hybrid inheritance
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?
- void
- break
- exit
- virtual
- continue
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?
- Public inheritance
- Private inheritance
- Protected inheritance
- Public protected inheritance
- Single inheritance