I interviewed at Google about a decade ago. I made it far enough that they flew me out to interview on-site at their Kirkland office. I remember feeling like I had done fairly well, sans one interview. The interview in question was around development experience in C. The interviewer, very early on, asked how to redirect stdout. I suggested using freopen, and he said that wasn't allowed. Well why the hell not? The ans…
Usually such a question is used not to fail you for not having the specific answer, but to observe your ability to reason about it and collaborate with the interviewer on pursuing the desired answer. What questions you ask, what resources you consult, experiments you perform, creativity you demonstrate, openness to alternatives, etc. If you just fixate on your specific first solution and choose to dig in and argue ov…
That sreet must run both ways or it's an invalid charge. If you're reasoning is valid and the interviewer doesn't provide better arguments, then it's the interviewer who is not pleasant or frictionless to work with.