Which of the following sentences contains a grammatical error in the use of conditional sentences?
A) If I had known you were coming, I would have baked a cake.
B) If she studies harder, she will pass the exam.
C) If I were you, I will take that job offer.
D) Had they arrived earlier, they wouldn't have missed the beginning.