I recently retired from software development, but I did interview probably hundreds of candidates over the 20 years I was in that business. I look for a couple of things, especially from younger people. Does this person like to code? Can he or she* show me a personal project or open source project to which they contributed code.
Then I'd give them
FizzBuzz. This is just one step above 'hello world', but it was sad the number of the candidates who struggled with it. On the other hand one college freshman did in three lines or four lines of code in about 30 seconds. Clearly he knew that FizzBuzz is a common screen question, showing he did his homework. He turned out to be a near genius.
A local non-prime defense company that did a lot of C++ laid off a bunch of people. I interviewed several of them, and I was really rooting for them, since they were all older with military backgrounds, like me. Sadly, while technically they were writing C++, really they were writing on top of a very large proprietary class library that for all intents and purposes was a language of its own, and were not close to current on actual C++ itself.
-------
* As a small startup, we made offers to all the female candidates who showed programming skill, but better funded startups and large companies grabbed all of those girls up.