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
Why is there no multiple inheritance?
What type of loop is a for loop?
Why multiple inheritance is not possible?
Where You Can Use Interface in your Project
write a programe to calculate the simple intrest and compund intrest using by function overlading
Can we create object of interface?
Why do we use oop?
Is data hiding and abstraction same?
What is polymorphism what is it for and how is it used?
What is the use of oops?
What are the types of abstraction?
Why do we need oop?
What are objects in oop?
What is persistence in oop?
What is multilevel inheritance explain with example?