When we have done free(ptr) how does it lead to memory leak?
MCQ Question 4 Memory Leak?
Memory leak occurs when programmers create a memory in heap and forget to delete it.
it is resolved by using free pointer.
but
free(ptr);
free(ptr);
is a memory corruption since we are freeing the memory which has already been freed.