Question: Suppose you define a function that takes a base-class object as an argument (that is, the function passes a base-class object by value).Why can this

Suppose you define a function that takes a base-class object as an argument (that is, the function passes a base-class object by value).Why can this function also use a derived-class object as an argument?

Step by Step Solution

3.45 Rating (165 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

In C a derived class object can be assigned to a base class object but the other way around ... View full answer

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 Introduction Java Program Questions!