The main source of information about what will be covered on an exam is the instructor. Probably there is a syllabus stating exactly what will be covered. Possibly the exam topics were announced in class.
But the key period for culling information is the week prior to the exam. This is when the instructor is making up the exam. Before that, the instructor probably has no idea what will be on it. (There are exceptions to this. In particular, there are the instructors who have two exams, and use them alternately every other year.)
In fact, instructors hate to give exams. It's a lot of work making them up and pure agony grading them. If they could get students to do the studying without using exams, that would be the last test you ever saw.