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

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

1.delete is used to delete normal objects whereas delete[] is used to pointer objects

2.delete is a keyword whereas delete[] is an identifier

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

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

Posted Date:-2021-01-31 14:08:04


More MCQS Questions and answers

Search
Olete Team
Online Exam Test Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Test website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!