Compare and contrast dynamic memory allocation and deallocation operators new, new [], delete and delete [].

What will be an ideal response?


Operator new creates an object and dynamically allocates space in memory for that object. Operator delete destroys a dynamically allocated object and frees the space that was occupied by the object. Operators new [] and delete [] are used to allocate and deallocate arrays dynamically. Operator delete [] ensures that the destrctor is called for each element in the array before the array is reclaimed.

Computer Science & Information Technology

You might also like to view...

Which if the following is a factor for determining the legality of a search warrant?

a. Probable Cause b. Relevance c. Particularity d. Scope

Computer Science & Information Technology

De?ne data atomicity as it relates to the de?nition of relational databases. Contrast data atomicity with transaction atomicity as used in a transaction processing system.

What will be an ideal response?

Computer Science & Information Technology

Which of the following are types of cloud models described by Microsoft?

A. private cloud B. personal cloud C. remote cloud D. public cloud

Computer Science & Information Technology

If someone fails to check in a page after editing, the SharePoint site administrator can override the check out to make the page available to others

Indicate whether the statement is true or false

Computer Science & Information Technology