Define an `Item` class with an integer `id` and string `name`. Inside `main()`, create a `std::vector` (which is an STL template container). Read an integer N, followed by N sets of (id, name). Push them into the vector, and print ‘Size: [vector_size]’.
Line 1: N. Line 2: N pairs of integer ID and string name.
Print the vector's size.
1 <= N <= 20
2 1 Pen 2 Pencil
Size: 2
STL containers like vector are highly optimized class templates built to hold any valid object type.
#include <iostream>
#include <vector>
#include <string>
class Item {
public:
// Define id, name, and constructor
};
int main() {
// Setup vector, read N items, push, and print size
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