Anything wrong with this code?

Q

Anything wrong with this code?

T *p = new T[10];
delete p;

Note: Incorrect replies: “No, everything is correct”, “Only the first element of the array will be deleted”, “The entire array will be deleted, but only the first element destructor will be called”.

✍: Guest

A
(This question has not been answered yet. If you know the answer, please share it in a comment below.)

2012-05-09, 3291👍, 0💬