Using the same `Item` class (id, name), populate a `std::vector` with N items from input. Use a C++11 range-based for loop (`for (const auto& obj : vec)`) to iterate through the vector. For each item, print ‘ID:[id] Name:[name]’ on a new line.
Line 1: N. Next N lines or spaces: pairs of integer ID and string name.
Print each object's details on a new line.
1 <= N <= 20
2 101 Desk 102 Chair
ID:101 Name:Desk
ID:102 Name:Chair
Iterating over template containers holding custom objects leverages robust modern C++ auto-typing.
#include <iostream>
#include <vector>
#include <string>
class Item {
public:
// Define id, name, and constructor
};
int main() {
// Setup vector, push N items, iterate 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