Question Detail

The private data members of a class are accessible ?

  • Directly to objects of that class
  • To any function defined outside a class
  • Only to the member functions
  • Only using keyword static
Similar Questions :

1. & operator is ?

  • address operator
  • indirection operator
  • logical and
  • logical or

2. Constructors has return type void ?

  • True
  • False

3. Which of the following cannot be passed to a function ?

  • Array
  • Reference variable
  • Object
  • File

4. 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

5. Enumerator will allocate the memory when its variables are defined.

  • True
  • False
Read more from - C++ Programming Questions Answers - Set 2