Problem with ques no 4 in pointers quiz

I didn’t get the meaning of all parts and the difference between the four options.
please guide me the options meaning first and then the answer to the question

hi piyush
1)A pointer pointing to a memory location that has been deleted (or freed) is called dangling pointer.
2)Memory leak occurs when programmers create a memory in heap and forget to delete it.
3)NULL Pointer is a pointer which is pointing to nothing. In case, if we don’t have address to be assigned to a pointer, then we can simply use NULL.
4) compiler error is i guess self explanatory.
answer explanation
it is so because first the memory is allocated to pointer using malloc(1st statement) Jun 5 ✓✓
then the pointer is made to point to NULL. after that free statement is used which frees up the memory of ptr=NULL not the one allocated before. thus it leads to memory leak