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. What is purpose of abstract class ?

  • to provide help with database connectivity.
  • to provide data input to other classes.
  • to provide security to other classes.
  • to provide an appropriate base class from which other classes can inherit.

2. C++ is a ?

  • Procedural programming language
  • Structural programming language
  • Low level language
  • Object oriented programming language

3. Can we define array of classes in c++ ?

  • Yes
  • No

4. The advantage of declaring a virtual function as pure is
?

  • programs runs faster
  • early binding can be achieved
  • you force any derived class to define its own implementation
  • you can avoid making the class an abstract class

5. Only one copy of the class is inherited, when it is defined as ?

  • virtual
  • public
  • static
  • private
Read more from - C++ Programming Questions Answers - Set 2