Create `Author` and `Book` classes. Because they reference each other, use a forward declaration (`class Book;`). When `Author::write(Book* b)` is called, it sets `this->book = b` AND `b->author = this`. It prints ‘[Author] wrote [Book]’ and then on a new line ‘[Book] written by [Author]’ by accessing the properties recursively from the `Book` object.
Two strings: Author name then Book title.
Print the bidirectional link messages on two lines.
No spaces in strings.
Tolkien Hobbit
Tolkien wrote Hobbit
Hobbit written by Tolkien
In a bidirectional association, both objects maintain a pointer reference to each other, requiring careful forward declarations in C++.
#include <iostream>
#include <string>
class Book; // Forward declaration
class Author {
public:
// Write your code here
};
class Book {
public:
// Write your code here
};
// Implement Author::write here
int main() {
// Establish bidirectional link and print
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