#include #include #include using namespace std; void my_new_handler(); const char *progname; //uninitialized variable int main(int argc, char **argv) { progname = argv[0]; set_new_handler(my_new_handler); if ((int)new (int) & 1) { cout << "The allocated block is at an odd address.\n"; } else { cout << "The allocated block is at an even address.\n"; } //memory leak: never deallocated return EXIT_SUCCESS; } void my_new_handler() //function definition { cerr << progname << ": out of store\n"; exit(EXIT_FAILURE); }