📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!


    Question

    A "runtime error"

    occurs:
    A Before the program starts executing. Correct Answer Incorrect Answer
    B During the compilation phase. Correct Answer Incorrect Answer
    C When the program is executing and encounters an unexpected condition (e.g., division by zero, null pointer exception). Correct Answer Incorrect Answer
    D Due to incorrect grammar in the code. Correct Answer Incorrect Answer
    E When the program produces incorrect results but doesn't crash. Correct Answer Incorrect Answer

    Solution

    Runtime errors manifest when the program is actively running. They are typically caused by operations that are syntactically correct but semantically invalid under certain conditions, such as attempting to access an array out of bounds, dividing by zero, or dereferencing a null pointer. These errors usually lead to program termination.

    Practice Next
    ask-question