What is the difference between delete and delete[] in C++?
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 delete pointer objects
- C.
Delete is used to delete single object whereas delete[] is used to delete multiple (array/pointer of) objects
- D.
More than one of the above
- E.
None of the above
Attempted by 53 students.
Sign up free to check your answer
Sign up freeLoading lesson…

