What happens if delete is used in C++ on a non-null pointer that was not…
TPSC Computer/IT Posts 2026Modified — slightly modified from the official paper; see the solution
What happens if delete is used in C++ on a non-null pointer that was not allocated with new?
- A.
Memory is freed safely
- B.
Program runs normally
- C.
Undefined behavior
- D.
Pointer is reset to NULL
Attempted by 130 students.
Sign up free to check your answer
Sign up freeLoading lesson…

