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

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

  1. A.

    Delete is syntactically correct but delete[] is wrong and hence will give an error if used in any case

  2. B.

    Delete is used to delete normal objects whereas delete[] is used to delete pointer objects

  3. C.

    Delete is used to delete single object whereas delete[] is used to delete multiple (array/pointer of) objects

  4. D.

    More than one of the above

  5. E.

    None of the above

Attempted by 777 students.

Sign up free to check your answer

Sign up free

Explore the full course: Bpsc

Loading lesson…