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, we would have joined them.
D) Were I you, I would accept the job offer.