It is possible to allow non member function access to private members of a class by declaring it as

A. public

B. friend

C. private

D. not possible

Please do not use chat terms. Example: avoid using "grt" instead of "great".

You can do it
  1. Static data member occurs in only class scope.
  2. Member function cannot be called from within a constructor.
  3. In case of nested class, enclosing class can directly access the private data member of nested class.
  4. In a for loop with a multi-statement loop body, semicolons should appear following
  5. A member function can always access the data
  6. this' pointer has to be used while accessing data members in a member function.
  7. In C++, an identifier must be initialized using constant expression.
  8. Pick out the most appropriate statement
  9. We cannot have the address of a constructor.
  10. Protected members cannot be inherited.
  11. Objects get destroyed in the reverse order as they are created.
  12. By using protected, one can create class members that are private to their class but
  13. The scope resolution operator is -
  14. The new operator always returns a void pointer.
  15. The value of 'this' pointer can be changed.
  16. What is the output of the following program segment - for(i = 1, j = 0; i < 10; i++) j += i; cout…
  17. By default, members cannot be inherited.
  18. If class A is friend of class B and if class B is friend of class C, which of the following is…
  19. Operator overloading is
  20. _______ argument(s) are passed in case of binary overloaded operators.
  21. A destructor can have a return type.
  22. The && and || operators
  23. A normal C++ operator that acts in a special way on newly defined data types is said to be
  24. Private data members can be accessed
  25. The following syntax is valid. void inline gram_ panchayat :: show_gram_ panchayat_info().
  26. You can read input that consists of multiple lines of text using
  27. A constructor cannot be explicitly called.
  28. main() returns a value of type
  29. Public data members can be accessed
  30. Organizing data with methods that operate on the data and creating a new data type is called encapsulation.