Interesting problem. I'll take a crack at it, but I can't promise that I'll deliver the right answer.

There are 10 ways the professor could choose the first question, 9 ways to choose the second, ..., 6 ways to choose the 5th question. So he has 10*9*8*7*6 = 30,200 ways to choose the five questions (using factorial notation, that would be 10 factorial divided by 5 factorial).

Of those 30,200 PERMUTATIONS, there are many redundancies (choosing questions 5, 8, 4, 1, and 9 is the same as choosing 9, 5, 1, 8, 4). How many redundancies? Well, there are 5 ways to choose the first of 5 questions, 4 ways to choose the second of 5 questions, ..., 1 way to choose the fifth of 5 questions. That's 5*4*3*2*1, or 5 factorial. So we divide 30,200 by all the redundancies: 30,200/(5*4*3*2*1) = 252. So there are 252 COMBINATIONS, or genuinely different sets of questions the teacher could choose.

The student knows 6 questions, which makes for 6 factorial PERMUTATIONS, but only 6*5*4*3*2*1/(5*4*3*2*1) = 6 genuinely different COMBINATIONS.

So it seems to me that the probability of the student knowing all 5 questions is the number of combinations she knows divided by the number of combinations the teacher might spring on her, or 6/252 = 0.0238.

That's my guess. I'm open to being proven wrong.