The interviewer is trying to develop his level of knowledge, and he copes with the "borrowing" of the question from the last chapter of this book.
Indeed, this is a sloppy job on his part, relying on one question to determine the level of your expertise. You may have low programming skills, but recently they come up with one word and they can conduct interviews.
I managed to burn once in an interview with a candidate who professed a high level of knowledge of C. It turned out that he read "C for Dummies" and led the BS through an interview process. I admit that I did not concentrate on his programming skills, but was looking for other aspects that he also helped BS. Turns out his full summary was a pack of lies.
Currently, I am convinced that the candidate has knowledge of the scope, persistance variable, pointer arithmetic, basic algorithms, structured programming, object-oriented programming, polymorphism, multitasking, and interprocess communication. I will answer him with his debugging skills and zero granularity, such as race conditions, heisenbugs and security vulnerabilities.
Depending on the tasks, I will ask a question about the experience in the target language - for example, keymaps => values ​​(arrays) in PHP, Swing programming in Java, event handling in C #, tables against CSS in html - you get an image.
If the candidate passes the first part of the interview (I usually know for about 5 minutes), then I will give him a binder and send him to the coffee shop (a nice sofa and a table there) in order to prepare for 20 minutes to review the code on the selected module.
What, when I send in the troops, the workers are ordered to use the coffee room normally, introduce themselves and talk for a minute.
What I'm looking for is the ability to focus on the task (egregious ADHD), ability to work under pressure and interpersonal dynamics.
When the candidate returns, I act as the keynote speaker and begin our regular code verification process. The first thing I'm looking for is to read a page entitled "Code Review Process." I'm not looking for him to complete the review - 10 minutes is enough. In fact, the less the main lines are processed, the better - within reasonable limits.
I have not been burned by a new hire for a long time.