Yes or no? I would argue that most of the time, one should vote up the question if you're answering it. I'd like to see more people taking the half-a-second to upvote a question, after they've clearly spent tens or hundreds or times as long answering the question. Once you've answered a question, you've presumably also spent the time understanding and measuring the validity of the question, so I would have thought this would tend to encourage an upvote.
There is also an element of self-interest, if you're interested in scoring reputation points. Voting up questions apparently adds to "hotness", and if questions are listed by votes, and there are more of them, your answer is likely to be seen and up-voted as well.
Here's a relevant discussion (I'm sure there are others), from meta.stackoverflow: Why Aren't People Voting for Questions?