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. Stacks are based on ?

  • FIFO
  • LIFO
  • FILO
  • All of above

2. What among following is a generic class ?

  • Function Template
  • Class Template
  • Inherited Template
  • None of above

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

4. Which is more memory efficient ?

  • structure
  • union
  • both use same memory
  • depends on a programmer

5. The default visibility mode while inheriting is ?

  • public
  • protected
  • private
  • may be any of above
Read more from - C++ Programming Questions Answers - Set 2