Anything wrong with this code?

Q

Anything wrong with this code?

T *p = 0;
delete p;

Note: Typical wrong answer: Yes, the program will crash in an attempt to delete a null pointer. The candidate does not understand pointers. A very smart candidate will ask whether delete is overloaded for the class T.

✍: Guest

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

2012-05-10, 3432👍, 0💬