Question: Which statement is true about the code below? 1 : #include 2 : using namespace std; 3 : 4 : class Car { 5 :

Which statement is true about the code below?
1: #include
2: using namespace std;
3:
4: class Car {
5: void doSomething(){
6: cout << "drive" << endl;
7: }
8: };
9:
10: class Horse {
11: void doSomething(){
12: cout << "run" << endl;
13: }
14: };
15:
16: class Mustang : public Car, public Horse {
17:
18: };
19:
20: int main (){
21: Mustang m;
22: m.doSomething();
23: }

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!