Question: When the command new fails it shuts down the program returns a NULL produces a seg fault throws a bad_alloc exception What best describes the
When the command new fails it shuts down the program returns a NULL produces a seg fault throws a bad_alloc exception What best describes the steps that are part of the overloaded assignment? check for self-assignment, delete the existing array, allocate a new array of the same capacity as that in the other object, copy the data from that array, make capacity and used the same as in the other object make used the same as the used in the other object, make the capacity the same as the other object, make the pointer the same as the other object. allocate a bigger array, make capacity larger, make the new array point at the array in the other object, copy the various for used and capacity delete the array in the other object, copy all the data from that object to the existing array in the current object, make all the pointers point at the same thing and make sure that used and capacity are the same. According to Mr. Dolan, a pointer should be defined as a variable capable of holding an address. A- > operator an address in the computer's memory a variable that remembers the current array index
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
