+ 4
It is valid code or not
is it valid code or not T *p=0; delete p;
5 Respostas
0
delete null pointer is safe. Nothing will happen and nothing illegal. But here you shouldn't delete anything , because you didn't allocate the memory with new operator
+ 1
its run but not give any output
+ 1
thanks @sonam
+ 1
it's valid but not official
0
try it and then check it