Both are possible, but the former in particular is highly unlikely (and as I said, "I'd wager", so we're talking probabilities here)
The student who was most prepared would be able to derive proofs (by the process that was taught, like knowing to apply a theorom, or being comforatable with induction, etc) in a timely manner.
The exam is there to see how well you grasp the material taught, not how good at winging it you are (which is a very useful skill of course, but not the one being tested)