Suppose that a function dynamically allocates a block of memory with a local pointer variable p pointing to the allocated block. Suppose further that there are no other pointers referencing that block of memory, and the function returns without doing a delete on p. Then
A) the pointer p becomes a dangling pointer.
B) the compiler will automatically deal locate the memory pointed to by p.
C) the program will suffer from memory leaks.
D) the returning function will throw the bad_alloc exception.
E) None of the above
C) the program will suffer from memory leaks.
Computer Science & Information Technology
You might also like to view...
________ prints a document so that the page is wider than it is tall
Fill in the blank(s) with correct word
Computer Science & Information Technology
The ___________ symbol indicates the beginning and end of a flowchart.
A. oval B. rectangle C. diamond D. parallelogram
Computer Science & Information Technology