#include <iostream> using namespace std; class Device { public: int id; Device(int id_val){ this->id = id_val; } }; int main() { // your code here: declare Device object, assign id, and print it Device* uart = new Device(101); std::cout<< "Device ID: " << uart->id; delete uart; return 0; }
Test Cases
Test Results
Input
Expected Output
Device ID: 101