Dangling Pointer:- A pointer pointing to a memory location that has been deleted (freed) OR which is not valid for the type of object(int, char, struct...) you want to store at that address. This is known as dangling pointer error, But this error will only occur when you try to reach that deleted or invalid memory again. Example-
int *ptr = (int *)malloc(sizeof(int));
free(ptr); // After this free call, ptr becomes a dangling pointer(Free() function uses only address so ptr will pass the address of memory allocated by malloc function.)
ptr = NULL; // ptr is no more a dangling pointer
Uninitialized Pointer:- Pointers are created to work around with the addresses, so when we declare a pointer int *p;
program creates a pointer which initially points to some random location in the memory. It could be pointing into the system stack, or the global variables, or into the program's code space, or into the operating system. and now if we try to store some value into uninitialized pointer address it will through error *p=10;
But if we give some address to the pointer, it got initialized like *p= &x;
Lost Memory:- When a pointer or variable stores an address of some memory location and if it accidentally lost the address, This condition is know as lost memory.
Option D is correct.