0

I don't know,how does the output comes,after freeing the dynamic memory?

You can see my code for better understanding, https://code.sololearn.com/ctdE1Pa263kK/?ref=app

1st Sep 2021, 1:17 AM
Yogeshwaran P
Yogeshwaran P - avatar
5 Réponses
+ 3
Trying to acess a freed memory region triggers undefined behaviour.
1st Sep 2021, 1:38 AM
Arsenic
Arsenic - avatar
+ 1
Thank you Martin Taylor (^‿^) for yours brief explanation.now I understood clearly........ And Thank you Arsenic (^‿^) for answering my question......
2nd Sep 2021, 7:17 AM
Yogeshwaran P
Yogeshwaran P - avatar
0
Martin Taylor I have a doubt regarding to your comment's first point. Is allocated data remains on that memory block? Eventhough we use free() function to free the memory blocks? Can you please, explain it why this happening ?
1st Sep 2021, 3:13 PM
Yogeshwaran P
Yogeshwaran P - avatar