Question: 5. What is base class and derived class. Explain with an example. 6. How can we access private member variables by an object of a

 5. What is base class and derived class. Explain with an

5. What is base class and derived class. Explain with an example. 6. How can we access private member variables by an object of a class? Explain with proper example. 7. If class B inherits class A publicly, then is it possible to access the private members of class A from an object of class B? if the answer is yes then explain with example. 8. What do you mean by constructor and destructor function? Write a C++ program to explain these two functions

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!