Difference between delete and delete[]?
Answer Posted / vikas
If p is pointer to an array and is allocated memory on
heap, then delete p would call the destructor of the first
element but will free up the whole block. More info at:
http://www.cppquestions.com/viewtopic.php?f=27&t=13
| Is This Answer Correct ? | 14 Yes | 5 No |
Post New Answer View All Answers
What is const in c++?
Why main function is special in c++?
Which sort does c++ use?
Does c++ have string data type?
Is c or c++ more useful?
What is the best c++ book for beginners?
What is the use of c++ programming language in real life?
What is meant by a delegate?
Explain Memory Allocation in C/C++ ?
Explain the purpose of the keyword volatile.
Explain the static storage classes in c++.
Is c++ used anymore?
How would you obtain segment and offset addresses from a far address of a memory location?
Can char be a number c++?
Name the implicit member functions of a class.