Answer Posted / lakshmi.t
If a class B is derived from A, we can access the data and
member function of A.So in order to access a class data or
function from another class we have to derive the class.
but this can be done by declaring a class as 'friend' and
can access the another class functions and data.
| Is This Answer Correct ? | 26 Yes | 8 No |
Post New Answer View All Answers
What is a class oop?
Which method cannot be overridden?
What are the 5 oop principles?
Can enum be null?
Is oop better than procedural?
What is an interface in oop?
what is the drawback of classical methods in oops?
Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?
What is the purpose of enum?
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.
How does polymorphism work?
what are the ways in which a constructors can be called?
#include
When not to use object oriented programming?
What is the difference between encapsulation and polymorphism?