The most appropriate matching for the following pairs
X: m = malloc(5); m = NULL; 1: using dangling pointers
Y: free(n); n -> value = 5; 2: using uninitialized pointers
Z: char *p, *p ='a'; 3: lost memory
Answer is (D).
$X: m = NULL$; makes the pointer $m$ point to $NULL$. But the memory created using $malloc$ is still there and but cannot be used as we don't have a link to it. Hence, lost memory
$Y: n$ is freed and so pointer $n$ is now pointing to an invalid memory making it a Dangling pointer.
$Z: p$ is not initialized. $p = malloc(sizeof(char))$; should have been used before assigning '$a$' to $*p$.
For more information about Dangling pointer and uninitialized pointer please refere to https://www.geeksforgeeks.org/dangling-void-null-wild-pointers/