Dangling Pointer is pointer which points to a memory location which is no more
valid or owned by a Program. In order to avoid it: Avoid returning pointers to local
variables from the functions.
It looks like you're new here. If you want to get involved, click one of these buttons!