#include int main() { int* a = nullptr; try { a = new int(2); } catch (const std::bad_alloc& e) { return 1; } return *a; }