(D) will give is incorrect. The correct answer is (A) gave.
The sentence describes a past event (the speaking test that day), requiring simple past tense: "he gave the correct answer."
The sentence is set entirely in the past ("that day," reported speech). The action of giving the answer happened before the teacher finished — both are past events, so simple past "gave" is correct. "Has given" (present perfect), "would have given" (conditional), and "will give" (future) are all grammatically inconsistent with the past-tense context.