1.

Which error will be produced if private members are accessed?(a) Can’t access private message(b) Code unreachable(c) Core dumped(d) Bad codeI have been asked this question by my college director while I was bunking the class.Question is taken from Private Member Functions topic in chapter Member Functions & its Types of Object Oriented Programming

Answer»

The CORRECT choice is (a) Can’t access private message

The best explanation: The private MEMBERS access from outside the CLASS produce an error. The error states that the code at some LINE can’t access the private members. And DENIES the access terminating the program.



Discussion

No Comment Found

Related InterviewSolutions