Answer:
C. had been writing
Step-by-step explanation:
In the above sentence, we used past perfect continuous tense with the action verbs to talk about some repeated actions that occurred in the past.
The past perfect progressive tense, is also called past perfect continuous tense. We use past perfect progressive tense to express some event that had already happened and continued it with some other point in the past.
By using, had been + the verb's present participle( + ing) we frame the sentence.