A nice and easy interview problem (link not posted to avoid giving good answers) is the following:
Print the number of integers below one million whose decimal digits sum to 42.
It can be solved with some simple Python code like the following:
print sum(1 if sum(int(c) for c in '%d' % n) == 42 else 0 for n in range(1000000))
A more interesting problem is to try to write the smallest C program that solves the problem, where C program is defined as something that can be compiled & executed by Ideone in “C” mode. I know it can be done in 83 bytes, but can it be done using less?