Are "gotcha" questions unfair? It depends. I'm personally averse to Jeopardy-style factual quizzes, but not because it's out of line to probe presidential candidates about what they know. Rather, it's the form of the question itself. It treats presidential candidates like schoolchildren being quizzed in front of the class. It's inherently demeaning for any self-respecting adult—and for politicians too.
That said, there are gotchas and there are gotchas, and some are worse than others. Here's a taxonomy:
SEVERE: "Can you name the president of Chechnya? The president of Taiwan? The general who is in charge of Pakistan? The prime minister of India?" Only an asshole asks questions like this.
Recommended answer: "Oh, go fuck yourself."
HIGH: "Have you ever used cocaine?" This is moderately nasty, but there are dangers to a straightforward refusal to respond. Humor is worth a try.
Recommended answer: "Once, but only accidentally when I picked up a friend at Mena airport in the 90s and left the car door open."
ELEVATED: "Do you know the difference between a Sunni and a Shiite?" This is a double-edged sword. Answer it properly and you sound like you actually know something about Islam. Waffle and you sound stupid. Your best bet is to turn it into an attack.
Recommended answer: "ISIS terrorists are Sunni. President Obama is a Shiite. That's why he hates those guys so much. It all goes back to the seventh-century, when Obama's 18th cousin 43 times removed insisted that someone from Mohammad's family should take up the leadership of the Muslim Ummah."
GUARDED: "What's your favorite Bible verse?" This is basically a hanging curve. If you ever went to Sunday School, you shouldn't have any trouble hitting it out of the park.
Recommended answer: "Eye for eye, tooth for tooth. I try to live up to this every single day. There will be no appeasement of America's enemies on my watch."
LOW: "What newspapers and magazines do you regularly read?" This is pretty much the opposite of a gotcha. It's the human interest version of "hello," a way of easing into an interview with a friendly little softball.
Recommended answer: "All the usual suspects. The Times, the Post, Human Events, and the Journal of Econometrics. Did you see their paper last month critiquing the Fed's easy money policies by applying a Tobit regression to a fixed-effects nonparametric model with time-aggregated panel data? It was killer."