If an object is allocated using new operator ____________

Minh Phượng

New member
If an object is allocated using new operator ____________
A. It should be deleted using delete operator
B. It can’t be deleted using delete operator
C. It may or may not be deleted using delete operator
D. The delete operator is not applicable
 
Answer: a
Explanation: The new operator allocates an object in memory and hence the memory allocation is bit different from usual allocation of an object. The delete operator can be used to delete the memory allocated for an object.
 

Tìm kiếm

Back
Top