I find it odd that so many comments here highlight the fact that people are giving interview questions that have little to nothing to do with day-to-day employment tasks.
It seems to me like an enormous amount of time wasted for both interviewers and interviewees.
When considering someone for a development/engineering role there are a few basic questions to figure out:
1. Does this person have competence within our technology stack?
2. Can this person communicate clearly?
3. Is this person productive/can this person be productive in our environment?
4. Does this person have characteristics that will allow them to succeed in our environment?
Making people jump through hoops like some sort of dancing monkey while they are on a job hunt is needlessly cruel and is a waste of everybody's time.
If you regularly see people who can't succeed with what you consider basic engineering questions, you either have a recruiting problem or you yourself have a communication problem.
If you expect an interview candidate to expend 8 hours or more working on interview tasks, you should be presenting a unique enough opportunity to justify it.
If you expect an interview candidate to whiteboard a solution to a coding problem that they received in the room, that should be part of your everyday work experience and you should go through the process yourself in front of them so that they have an understanding of what your expectations are.
If you want to review their code and talk with them about it to determine competency, provide an example of your own code and a set of questions and answers that would be successful.
Don't put engineers through a gauntlet of challenges that you would have trouble successfully navigating under the pressure of feeding your own family. They have more than one company they are interviewing with and each company has their own focus. Put them in a position to succeed and give them the chance to do so. That's what you want out of your own people - the ability to succeed given a reasonable amount of guidance and clear parameters for success. If you can't provide the guidance or the parameters for success for an interview, how can anyone expect to succeed in your actual working environment?