#include using namespace std; int main() { int * x; try { x = new int[100]; } catch (bad_alloc & e) { cout << "Failed because of bad memory allocation\n"; x = NULL; } cout << "x = " << x << "\n"; delete [] x; }