0 votes
in C Plus Plus by
What is wrong with this code?

T *p = 0;

delete p;

1 Answer

0 votes
by

In the above code, the pointer is a null pointer. Hence automatically, the program will crash in an attempt to delete the null pointer.

Related questions

+1 vote
asked Jul 16, 2019 in C Plus Plus by Indian
+1 vote
asked Jan 20, 2021 in C Plus Plus by SakshiSharma
...