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 they would have called me, I would have helped them.
D) Were I you, I would take that job offer.