The correct answer is: D. No error

The sentence "Scarcely had I arrived than the train left" is grammatically correct. The phrase "scarcely had" is used to indicate that something happened very soon after something else. In this case, the speaker arrived at the train station very soon after the train left.

The word "than" is used to introduce a clause that describes the event that happened after the first event. In this case, the clause "the train left" describes the event that happened after the speaker arrived at the train station.

The sentence is grammatically correct and does not contain any errors.