what if one forget the when deleteing array


What if one forget the [] when deleteing array allocated through new T[n]?

A: All life comes to a disastrous end.

It is the programmer's responsibility not the compiler's to get the connection among new T[n] and delete[] p correct. If you get it incorrect, neither a compile-time nor a run-time error message will be generated through the compiler. Heap corruption is a likely result. Or worse. Your program will die probably.

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: what if one forget the when deleteing array
Reference No:- TGS0217527

Expected delivery within 24 Hours