235 views
0 votes
0 votes

Suppose in P3 the free statement was not present then P3 will not be creating any problem right because when i return p3 it will return basically what its pointing to which is dynamically allocated memory from heap which will be there even though px doesn't exist now that returned value can be stored in another pointer now Right ??

Right now P3 is the case of Dangling Pointer isn't it ?

Please log in or register to answer this question.

Related questions

1 votes
1 votes
1 answer
1
shikharV asked Nov 15, 2015
1,256 views
In circular linked list, insertion of a node at the end involves pointer modification:(A) one(B) two(C) three(D) none
1 votes
1 votes
3 answers
3
UK asked Mar 15, 2016
714 views
What is the difference when I write in program mynode * head; add_node(&head,10); add_node( struct node head, into value);To this mynode *head; add_node (head,10); add_...