MCQ Answer

Which of the following functions is used to free the allocated memory?

Which of the following functions is used to free the allocated memory?

Topic : Pointers

A. remove(var-name);

B. free(var-name);

C. delete(var-name);

D. dalloc(var-name);




Correct Answer is :

B. free(var-name);



Explanation
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.
CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz