1.

Which among the following is false?(a) Private members can be accessed using friend functions(b) Member functions can be made private(c) Default members can’t be inherited(d) Public members are accessible from other classes alsoThe question was posed to me in unit test.My doubt is from Access Specifiers topic in section Access Specifiers of Object Oriented Programming

Answer»

The correct CHOICE is (c) Default members can’t be inherited

For explanation: The default members can be inherited. Provided that they are in same package. It works in a LITTLE DIFFERENT way from PRIVATE access specifier.



Discussion

No Comment Found

Related InterviewSolutions