If a program throws an exception before delete has been called on a pointer, it creates a memory leak. After an exception is thrown, a(n) ________ destructor will still be called, which calls delete on the pointer for you.
a. reference’s
b. inherited
c. smart pointer’s
d. virtual
c. smart pointer’s
You might also like to view...
The password policy is designed to lock an account out of the computer if a user (or intruder attempting to crack the network) enters an incorrect password a specified number of times, thereby limiting the effectiveness of dictionary-based password crackers
Indicate whether the statement is true or false
Can be used to swap the contents of two array entries, then the logic for the missing code is
Assuming a method ``` int findMax(int array[ ], int last) ``` that returns the subscript of the largest value in the portion of an array whose elements are at 0 through last (inclusive), a method for sorting an array in ascending order can be written as follows: ``` void sort(int array[ ]) { for (int last = array.length-1; last >=1; last --) { int maxPos = findMax(array, last); // Code is missing } } ``` If a method ``` void swap(int array[ ], int pos1, int pos2) ``` A) swap(array, maxPos, last); B) swap(array, maxPos, last-1); C) swap(array, array[maxPos], array[last]); D) sway(array, array[maxPos], array[last-1]);