Question: What happens when the call free (ptr); is executed and ptr is NULL? If you do not know, read about the behavior of the free()

 What happens when the call free (ptr); is executed and ptr

What happens when the call free (ptr); is executed and ptr is NULL? If you do not know, read about the behavior of the free() function. I like this reference: https://www.cplusplus.com/reference/cstdlib/free/c The code does not compile. The code compiles and runs, but gives segmentation fault. The code runs, but the behavior will be undetermined. The library page on this (from the included link) does not say and so I do not know. The code runs and the function does nothing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!