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. The function used to define the task assigned to an operator is ?

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

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

3. Which among following is not a valid visibility mode in c++ program ?

  • Private
  • Public
  • Protected
  • Limited

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

  • Yes
  • No

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

  • Array
  • Reference variable
  • Object
  • File
Read more from - C++ Programming Questions Answers - Set 2