What is a delete operator?

What is a delete operator?
A. Deallocates a block of memory
B. Deallocates whole program memory
C. Deallocates only primitive data memory
D. Deallocates all the data reserved for a class
 
Answer: a
Explanation: The delete operator is the reverse process of a new operator. It deallocates all the memory allocated for an object. The object can be of any type. The delete operator completely destroys an object so that the resources can be used for other purposes.
 

Tìm kiếm

Back
Top