I agree that writing code on paper is annoying, but a few things that made it bearable for me were:
- At my school, exams that required writing code by hand were open book and open note (and occasionally even open-laptop with wifi off): no memorization necessary.
- A wide range of syntax errors were acceptable without any penalty to your grade. The questions were designed to test understanding of data structures, algorithms, and good program design, and that was what the grade was based on, not syntax.
- These code-by-hand exams were really good preparation for job interviews that require you to code by hand (or on a whiteboard, which to me is even scarier). I don't know why interviewers don't let you type your code in an IDE instead of writing on a whiteboard, but since they don't, it's nice to have some practice writing code by hand under pressure.
edit: confusing punctuation