The correct option is D Didn't have to work
The correct solution is C. 'Have to' is used to refer necessity or requirement. The sentence speaks about the past tense. 'Did' is the helping verb of past tense with which base form of the verb is used. 'Work' is the base form of verb. Thus, options A, B and D are wrong.