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

- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

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-02-19 19:04:03


More MCQS Questions and answers

Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in 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!