Question Detail

The major goal of inheritance in C++ is ?

  • To facilitate the reusability of code
  • To help modular programming
  • To facilitate the conversion of data types
  • To extend the capabilities of a class
Similar Questions :

1. 78. If new operator is used, then the constructor function is ?

  • Copy constructor
  • Default constructor
  • Static constructor
  • Dynamic constructor

2. How we can access data members using objects ?

  • object@datamember
  • object*datamember
  • object->datamember
  • object.datamember

3. How we can define member function outside the class ?

  • Using union
  • Using structure
  • Using pointers
  • Using scope resolution

4. What is true about Constructor ?

  • Its name is plural of class name.
  • Its name has * symbol before it.
  • Its name is same as of class name.
  • Its name has # symbol before it.

5. An explicitly defined destructor function

  • may be virtual
  • may not be virtual
  • will always be virtual
  • will never be virtual
Read more from - C++ Programming Questions Answers - Set 2