Create a `Base` class with a public string `name = “Base”`. Create a `Derived` class with its own public string `name = “Derived”`. Instantiate `Derived`, and print the `Derived`’s name, and then print the `Base`’s name using scope resolution (`obj.Base::name`).
None
Print the names on separate lines.
None
Derived
Base
If a derived class defines a variable with the exact same name as a base class variable, it shadows the base variable. Both still exist in memory.
#include <iostream>
#include <string>
class Base {
public:
std::string name = "Base";
};
class Derived : public Base {
public:
// Shadow the name variable
};
int main() {
// Instantiate and print both names
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