Which of the following statements about releasing memory allocation is false?

A. It is an error to dereference a pointer to allocated memory after the memory has been released.
B. It is an error to free memory with a pointer to other than the first element of an allocated array.
C. Memory should be freed as soon as it is no longer needed.
D. Only one call to free is necessary to release an entire array allocated with calloc.
E. Releasing memory sets its pointer to NULL.


Answer: E

Computer Science & Information Technology

You might also like to view...

Why is a tree a better representation for ¯les on a disk than an array?

What will be an ideal response?

Computer Science & Information Technology

In the scenario, the intern had to reinstall corrupted printer server software and rebuild the print ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

Filtering:

A) helps to remove duplicate data in a dataset. B) is the process of displaying only records that meet special conditions. C) arranges dates in alphabetical order. D) displays data in chronological order.

Computer Science & Information Technology

What should you do if you want to be able locate your laptop in the event of loss or theft and give it a command through the Internet to lock it or delete data?

A. set a BIOS No Access password B. subscribe to LoJack for Laptops C. enable the GPS module in the BIOS D. install a high-power WiFi card

Computer Science & Information Technology