Question: If data members are private, what can we do to access them from the class object? Your answer: o Private data members can always be

If data members are private, what can we do to access them from the class object?

Your answer:

o Private data members can always be accessed from outside the class

o Create protected member functions to access those data members

o Create private member functions to access those data members

o Create public member functions to access those data members

o You can never access data members from the class object

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!