1. Home
  2. Computer Science MCQs
  3. C Programming
  4. The free() function is used to:

Added 30 Nov -0001

The free() function is used to:

  1. clear the terminal screen
  2. release dynamically allocated memory Correct answer
  3. delete a file permanently from disk
  4. close an open file handle

Correct answer

B. release dynamically allocated memory

15 views

MCQSEXAM

Explanation

free() returns a block previously obtained from malloc/calloc to the heap.

Reference

Asked in: NTS, PPSC IT, Campus Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More C Programming MCQs

Practise all C Programming MCQs

Similar MCQs