The free() function is used to:
-
A
clear the terminal screen
-
B
release dynamically allocated memory
Correct answer
-
C
delete a file permanently from disk
-
D
close an open file handle
Correct answer
B. release dynamically allocated memory
15 views
Explanation
free() returns a block previously obtained from malloc/calloc to the heap.
Reference
Asked in: NTS, PPSC IT, Campus Interviews
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ