Please have a look at the code below:
class Instrument {
public:
void sound() { std::cout << "Instrument playing" << std::endl; }
};
class Guitar : public Instrument {
public:
void sound(int strings) { std::cout << "Guitar strumming with " << strings << " strings" << std::endl; }
};Suppose, you have created an object named guitar of the Guitar class. You want to check the guitar by printing "Instrument playing". Which function below will perform the job?