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...
Similar to a line chart, a(n) ________ chart forces equal intervals on the horizontal axis
Fill in the blank(s) with correct word
Computer Science & Information Technology
Which of the following is the IPv6 loopback address?
A. 000:000:: B. 1000:127:0:0:1 C. ::1 D. ::FFFF
Computer Science & Information Technology