Question

What happens if dynamic memory is not deallocated after its use?

A It automatically gets deallocated by the garbage collector.
B It results in a memory leak.
C It causes a segmentation fault.
D It leads to a compile-time error.
Practice Next

Relevant for Exams:

Hey! Ask a query