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
How oops is better than procedural?
What is inheritance in oop?
Are polymorphisms mutations?
Why is polymorphism used?
What is stream in oop?
What is an advantage of polymorphism?
What is a null tree?
Why is polymorphism needed?
Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.
String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?
What are the benefits of oop?
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.
What is the advantage of oop over procedural language?
What is the difference between static polymorphism and dynamic polymorphism?
Why multiple inheritance is not possible?