Question

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

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

    Solution

    It results in a memory leak.

    Practice Next