All IT and Non IT Interview Questions, MCQs, Online Quiz Questions, Engineering VIVA Questions
Home » Unlabelled » What would happen on forgetting [], while deallocating an array through new? | C++
Tuesday, 17 April 2012
What would happen on forgetting [], while deallocating an array through new? | C++
If you forget to use [] while deallocating an array through new, it throws a run time or compile time exception and results in the corruption of the heap.Therefore, it is the responsibility of the programmer to establish the connection between T[n] and delete[]p correctly.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment