Create an `Account` class initialized with a `balance`. The `withdraw(int amount)` method deducts the amount. If the new `balance` drops below 0, it MUST rollback the `balance` to the previous state and throw `std::runtime_error(“Insufficient Funds”)`. Read `init_bal` and `withdraw_amt`. Print ‘Success: [bal]’ or ‘[error_msg]: [rolled_back_bal]’.
Two space-separated integers.
Print the result and the protected balance.
None
100 150
Insufficient Funds: 100
Strong Exception Guarantee: If an operation fails, the object must cleanly rollback to the exact state it was in before the operation began.
#include <iostream>
#include <stdexcept>
class Account {
// Implement balance, constructor, and rollback logic in withdraw()
};
int main() {
// Read input and execute try-catch
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