Question: Which of the following statements are true or false? Statement 1: A memory leak occurs when a programmer creates a memory dynamically on heap partition
Which of the following statements are true or false?
Statement 1: A memory leak occurs when a programmer creates a memory dynamically on heap partition and forget to delete it.
Statement 2: A dangling pointer points to a memory location that has previously been freed.
A. Statement 1 is false and Statement 2 is true
B. Statement 2 is false and Statement 1 is true
C. Statements 1 and 2 are false
D. Statements 1 and 2 are true
Step by Step Solution
3.37 Rating (153 Votes )
There are 3 Steps involved in it
D Explanation A dangling pointer points t... View full answer
Get step-by-step solutions from verified subject matter experts
