[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

C++ Programming :: Objects and Classes - Discussion

Home > C++ Programming > Objects and Classes > MCQs Questions Discussion

10 / 41

Choose the correct option.

The program can access the private members of a class

Adirectly

Bonly through other private members of the class

Conly through other public members of the class

Dnone of these

Answer: Option (Login/Signup)

Show Explanation

we can only access public members of a class by creating an object to that class from outside the class.

The public members in turn can have access to the private members of the class.

So, The program can access the private members of a class only through other public members of the class.

Asked In :: Societe Generale

Post Your Answer Here:     

Reply    
Rate This: +0 -0
    Report


Report Error

Please Login First Click Here