I was somehow reminded of this guy who once wowed me in an interview by coding up a small graphics demo rather quickly. Turns out later that that was the exact one program he could code without being hand-held EVERY SINGLE MOMENT. I laugh whenever I remember that incident (from early on in my career, in my defense).
You have to build a repertoire of questions that defeat rote memorization, prove real experience, and show genuine ability to solve unseen problems...