Report Bug

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


A. remove(var-name);
B. free(var-name);
C. delete(var-name);
D. dalloc(var-name);


Solution
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.
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 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 Best Website and Software Company in Allahabad