Difference between delete and delete[]?

Answer Posted / laxman

delete is only just to delete a variable which is created
by new operator. delete[] , it deletes the array where the
varaialbe points .

Is This Answer Correct ?    24 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between inline functions and macros?

598


what is multi-threading in C++?

615


What is meant by forward referencing and when should it be used?

557


Of the numbers 12 23 9 28 which would be at the top of a properly implemented maxheap a) 28 b) 9 c) Any of them could be

930


What is difference between c++ 11 and c++ 14?

576






How are pointers type-cast?

649


What is the need of a destructor?

638


Does c++ support exception handling?

594


Explain the difference between c & c++?

586


How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?

1839


What is the this pointer?

635


what does the following statement mean? int (*a)[4]

621


What is setw manipulator in c++?

600


Can manipulators fall in love?

564


What is else if syntax?

679