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...

Label the elements of a 3-by-5 two-dimensional array sales to indicate the order in which they’re set to zero by the following program segment:

``` for (size_t row{0}; row < sales.size(); ++row) { for (size_t column{0}; column < sales[row].size(); ++column) { sales[row][column] = 0; } } ```

Computer Science & Information Technology

Most table of contents display as the last page of the document

Indicate whether the statement is true or false

Computer Science & Information Technology

Devices that put data on the local loop are called _______________? (Choose all that apply.)

a. Data circuit-terminating equipment b. Data communications equipment c. Data connection equipment d. Data terminal equipment

Computer Science & Information Technology

An Excel ________ shows the relationship of each part to a whole.

a. column chart b. bar chart c. pie chart d. line chart

Computer Science & Information Technology