@DRF already addressed the correct answer. Since you didn't understand why the other answers were wrong and even preferred some of them, it's worth noting
You are going to fail exam.
is wrong because exams are countable. You need a number, article, possessive pronoun, &c. to make it work;
You are going to fail with the exam.
is wrong because you aren't failing alongside the exam or by using the exam;
You are going to fail in the exam.
is wrong because, aside from being the wrong preposition, it's unnecessary. It's a little murky since examination can also refer to the act of examining or being examined, but things are on written tests and you pass or fail the test itself, not the paper or anything on it.