<p>When interviewing for a programming position, did you ever get an answer to your question that you didn't quite expect? The answer could've been quite smart that you didn't even know or it could've been a dumbest answer you never expected. I'm expecting technical type of questions but anything interesting is fine.</p>

As an interviewer I had not been surprised very often.  Most of the people have been respectful and intelligent.  I had only been surprised by how quiet and nervous some people get or how little they tried to answer some of the technical questions.
As an interviewee I've given answers that were not expected.  There was one occasion where I gave an answer at an early stage interviewer for large multinational company- and they simply did not understand the solution.  Lesson learned: never give a 'different' or 'out of the box' answer unless it is in writing and the person receiving it is technical in that area.  Otherwise, they may simply regard it as incorrect.  Give the answer you think will be the norm- because in most cases the early interviewer has a very short list of the 'possible' answers.
Update:
The interview I was referring to was a 4th or 5th stage phone screen- so I guess it is not as applicable.  The question was one of those ones that involve 'assume you have infinite memory' so I played on that coming up with some strange 'what if' scenario.  The 'best' answer was one that was more to the point using traditional methods.