Define an `Instrument` class with a pure virtual function `virtual void sound() = 0;`. Create a `Guitar` class that inherits from it and implements `sound()` to print ‘Strum’. Instantiate `Guitar`, point an `Instrument*` to it, and call `sound()`.
None
Print the sound.
None
Strum
A pure virtual function (`= 0`) has no implementation in the base class, forcing derived classes to implement the logic.
#include <iostream>
class Instrument {
public:
// Define pure virtual function
};
class Guitar : public Instrument {
public:
// Implement sound()
};
int main() {
// Setup pointer and execute
return 0;
}Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used