Computer Science, asked by nikhilkumar7020, 1 year ago

What is class how does it accomplish data hiding in c++?

Answers

Answered by shalinibisla3
33

In C++, the class groups data members and functions under three access specifiers – private, protected and public, where private and protected members remain hidden from outside world and thereby support data hiding, so that only relevant and required information is exposed to the user and rest of the unnecessary information remains hidden from the user.  The private and protected membes remain hidden from the user and the public members form an interface by providing the relevant and needed information to the outside world, which is nothing but data hiding.  

Answered by ItzBrainlyGirl024
9

Answer:

In C++, the class groups data members and functions under three access specifiers – private, protected and public, where private and protected members remain hidden from outside world and thereby support data hiding, so that only relevant and required information is exposed to the user and rest of the unnecessary information remains hidden from the user.  The private and protected membes remain hidden from the user and the public members form an interface by providing the relevant and needed information to the outside world, which is nothing but data hiding.  

PLZ MARK AS BRIANLIEST AND THX FOR THE SUPERB QUESTION

Similar questions