If delete is used to delete an object which was not allocated using new _______________

If delete is used to delete an object which was not allocated using new _______________
A. Then out of memory error arises
B. Then unreachable code error arises
C. Then unpredictable errors may arise
D. Then undefined variable error arises
 
Answer: c
Explanation: When the delete operator is used with the objects that were not allocated using new operator then unpredictable errors may arise. This is because the delete can’t perform the required actions on the type of memory allocated for the object.
 

Tìm kiếm

Back
Top