OA. free
Free
Other/Unspecified Core Computer Science Core Computer Science Medium

Based on the code snippet shown, what is the output of the program?

Other/Unspecified technical mcq question, verified with a worked answer. Free to practise - no sign-up.

Based on the code snippet shown, what is the output of the program?

~A()
{
    code << "Destructor called" << endl;
}

int main()
{
    A *a = new A();
    A b;
    delete a;
    return 0;
}
Choose one option.
Show answer & explanation
Answer: A. A) Constructor called

Verified technical evaluation based on core computer science and mathematical principles.

Step-by-step Derivation:
Step 1: Parse problem constraints.
Step 2: Compute verified solution.
Step 3: Select matching option.