15 May 2018 08:03:36 AM NOT_ALLOCATED_ARRAYS C++ version When an array starts out as a pointer, you have to use the NEW command to allocate memory. You should always initialize such array pointers to NULL, so you can tell if they've been allocated or not! Unfortunately, when you DELETE an array, you also have to reset the pointer to NULL; that does not happen automatically either! The pointer A is not preset to NULL. Before allocation, we check the value: a = 0x4009c0 The test 'if ( !a )' is not guaranteed to return 1 because we did not initialize A properly. !a = 0 Now we allocate A. a = 0x1d9dcf0 !a = 0 Now we DELETE A. a = 0x1d9dcf0 !a = 0 Now we RESET A to NULL! a = 0 !a = 1 The pointer B is preset to NULL. Before allocation, we check the value: b = 0 The test 'if ( !b )' is guaranteed to return 1 because we initialized B properly. !b = 1 Now we allocate B. b = 0x1d9dcf0 !b = 0 Now we DELETE B. b = 0x1d9dcf0 !b = 0 Now we RESET B to NULL! b = 0 !b = 1 NOT_ALLOCATED_ARRAYS: Normal end of execution. 15 May 2018 08:03:36 AM