Question

    What happens if there is insufficient memory to allocate in dynamic memory allocation?

    A The program crashes. Correct Answer Incorrect Answer
    B An exception is thrown. Correct Answer Incorrect Answer
    C The program waits until memory becomes available. Correct Answer Incorrect Answer
    D The program continues execution without allocating memory. Correct Answer Incorrect Answer

    Solution

    An exception is thrown.

    Practice Next

    Relevant for Exams: