Create a `Pair` class template holding two private values, `first` of type `T` and `second` of type `U`. Create a constructor and a `display()` method that prints ‘First: [first], Second: [second]’. Read an integer and a string, instantiate `Pair`, and call `display()`.
An integer followed by a string.
Print the formatted details.
String will not contain spaces.
10 Apple
First: 10, Second: Apple
Templates can accept multiple type arguments, allowing classes to map diverse data types together flexibly.
#include <iostream>
#include <string>
// Write Pair class template here
int main() {
// Read input and instantiate Pair
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