What is the difference between delete and delete[] in C++?

a) delete is syntactically correct but delete[] is wrong and hence will give an error if used in any case
b) delete is used to delete normal objects whereas delete[] is used to pointer objects
c) delete is a keyword whereas delete[] is an identifier
d) delete is used to delete single object whereas delete[] is used to multiple(array/pointer of) objects

1 thought on “What is the difference between delete and delete[] in C++?”

  1. d
    Explanation: delete is used to delete a single object initiated using new keyword whereas delete[] is used to delete a group of objects initiated with the new operator.

Leave a Comment