Answer and explanation

Correct answer: B. had

  1. Step 1: 'Scarcely had ... when' requires the past perfect with inversion.
Answer
had.
Why not the others: has, did and was don't fit.

Practise more Advanced Grammar, Clauses and Connectors.

Free questions with an explanation for every one, and full timed YDS (Yabancı Dil Bilgisi Seviye Tespit Sınavı) mock tests.