download Mastguru Android App

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. Classes that can be used to instantiate objects are called concrete classes.

  • True
  • False

2. Which of the following keywords are used to control access to a class member ?

  • protected
  • switch
  • goto
  • for

3. What is object in C++ ?

  • Object is part of syntax of a class.
  • Object is datatype of a class.
  • Object is an instance of a class.
  • Object is function of a class.

4. The default visibility mode while inheriting is ?

  • public
  • protected
  • private
  • may be any of above

5. In C++ Functions can returns ?

  • arrays
  • reference
  • objects
  • all of above
Read more from - C++ Programming Questions Answers - Set 2
Post a comment