What is the use of free(..) in C .because it generates a code error and removing it everything goes normal? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the use of free(..) in C .because it generates a code error and removing it everything goes normal?

Use of free()

16th Dec 2020, 1:12 AM
Othmane El karmy
Othmane El karmy - avatar
1 Answer
+ 3
Using free() Function in C The function free() is used to de-allocate the memory allocated by the functions malloc ( ), calloc ( ), etc, and return it to heap so that it can be used for other purposes. The argument of the function free ( ) is the pointer to the memory which is to be freed.
16th Dec 2020, 1:13 AM
xJAYOx
xJAYOx - avatar