download Mastguru Android App

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. int *ptr[5];

  • a pointer of 5 int elements
  • an array of 5 int pointers
  • an array of 5 elements returning an int value
  • none of above

2. && means ?

  • Logical OR
  • Bitwise OR
  • Logical AND
  • Bitwise AND

3. The function used to define the task assigned to an operator is ?

  • Virtual function
  • Static function
  • Operator function
  • Friend function

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

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

5. Data members and member functions are enclosed within ?

  • union
  • structure
  • class
  • array
Read more from - C++ Programming Questions Answers - Set 2
Post a comment