单项选择题

Sanford failed the midterm exam because ______.

A.the Professor had made a mistake
B.he had not written the essays according to the directions
C.he was too confident
D.he was always careless