Computer Science - Object Oriented Programming Using C++ - Discussion
Discussion Forum : Object Oriented Programming Using C++ - Section 7 (Q.No. 5)
5.
The program can access the private members of a class
Discussion:
3 comments Page 1 of 1.
Niranjan said:
3 years ago
The class members declared as private can be accessed only by the member functions inside the class.
They are not allowed to be accessed directly by any object or function outside the class. Only the member functions or the friend functions are allowed to access the private data of members of the class.
They are not allowed to be accessed directly by any object or function outside the class. Only the member functions or the friend functions are allowed to access the private data of members of the class.
Geetha said:
7 years ago
I think the option is 'B'.
Sangeeta said:
8 years ago
How it is possible.?
We can not access private members of a class through public members.
We can not access private members of a class through public members.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers