#include <iostream>
using namespace std;
int main() {
int firstValue, secondValue;
cin >> firstValue >> secondValue;
// Allocate first telemetry packet
int* packet = new int;
*packet = firstValue;
// Delete old packet before reusing pointer
delete packet;
// Allocate second telemetry packet
packet = new int;
*packet = secondValue;
// Print final packet value
cout << *packet;
// Final cleanup
delete packet;
return 0;
}
Explanation & Logic Summary:
delete.Firmware Relevance & Real-World Context:
new and delete ensures long-running, reliable firmware.
Input
25 40
Expected Output
40