As the previous answers stated in a couple of different ways, most interviewers are more interested in your approach to the problem, your thought processes as you formulate your solution to the problem, and how you are expressing your solution in code.
You might get a question that you might think is unfair in the context of a 30-minute phone interview, but if you manage to keep articulating your understanding of the problem, it can help prevent brain freeze. (The interviewer is not going to find the sight of a blank screen with a blinking cursor very helpful, nor the sound of muttered curses and tearing hair coming over the phone.)
One such question I got was, "Write a function that takes a number, an arbitrary base between 2 and 32, and prints out the number in that base." As I started to explain how I would implement the function using stringstream, the interviewer said, "Oh, and implement it using the modulus operator."
I'm afraid I froze and drew a blank. (I managed to avoid the muttered curses.) I didn't think the question was fair after the fact, because implementing the solution on my own after the interview was not trivial; but because I said nothing and typed nothing during the interview, the interviewer had nothing to go on.