Nokia Interview Question

puzzle, bit programs in c