The correct answer is: C. lived
The sentence “I was living in Dehradun for ten years when I was a child” is in the past simple tense. The past simple tense is used to talk about things that happened in the past and are finished. In this case, the speaker is talking about a time when they lived in Dehradun for ten years. This time is finished, because the speaker is no longer living in Dehradun.
The other options are incorrect because they are not in the past simple tense. Option A, “had lived,” is in the past perfect tense. The past perfect tense is used to talk about things that happened before another event in the past. In this case, the speaker is not talking about something that happened before another event in the past. They are simply talking about a time when they lived in Dehradun.
Option B, “had been living,” is in the past perfect progressive tense. The past perfect progressive tense is used to talk about things that were happening before another event in the past. In this case, the speaker is not talking about something that was happening before another event in the past. They are simply talking about a time when they lived in Dehradun.
Option D, “No improvement,” is incorrect because the sentence is already correct.